WordPress.org

Forums

Google XML Sitemaps
Minor change diff suggested for a quick version 3.2.5 (3 posts)

  1. mattifesto
    Member
    Posted 4 years ago #

    I'm working on a plugin that submits new posts and I have my plugin catch errors, after submitting a new post, some errors are caused by the xml sitemaps plugin calling non-static functions statically.

    These functions are actually static, so they may as well be marked as such. These are the changes that avoid errors in my particular situation. Since they are minor and obvious I though you might include them if you decide to do a 3.2.5 version.

    sitemap-core.php

    1120c1120
    < function &GetInstance() {
    ---
    > static function &GetInstance() {
    1181c1181
    < function Enable() {
    ---
    > static function Enable() {

    sitemap.php

    49c49
    < function Enable() {
    ---
    > static function Enable() {
    149c149
    < function CallCheckForAutoBuild($args) {
    ---
    > static function CallCheckForAutoBuild($args) {
    230c230
    < function LoadPlugin() {
    ---
    > static function LoadPlugin() {

    http://wordpress.org/extend/plugins/google-sitemap-generator/

  2. Arne Brachhold
    Member
    Plugin Author

    Posted 4 years ago #

    Hi mattifesto,

    Thanks for your suggestion! The upcoming version 4 will be more clear about this. The 3.x versions are still PHP4 compatible, so I'm not able to add static or visibility keywords. The 4.0 version of the plugin will be PHP5 only, so it will be much cleaner then :-)

  3. mattifesto
    Member
    Posted 4 years ago #

    Thanks for the response. Since it seemed so obvious, I was almost sure you had a reason and since I never code for PHP4 I didn't know what it was.

    I'm looking forward to version 4.0.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Google XML Sitemaps
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic