• Resolved ssvictors

    (@ssvictors)


    Hi!
    This plugin is initialized in it’s constructor but this behavior leads to unforeseen consequences. For example, “load_plugin_textdomain” function is called before loading of qTranslate plugin and $locale variable does not set properly. May be would be better to create separate method for plugin initialization and register it through add_action(‘init’,…)(how it made in “Fast Secure Contact Form” plugin).

    http://ww.wp.xz.cn/extend/plugins/wp-realtime-sitemap/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Rincewind

    (@rincewind)

    Sorry but am unable to make this requested change for one reason, using this method of add_action(‘init’, …) would mean that my localization language files would be included on every single page in the admin area, and on the public site also, this would be inefficient imo.

    The file should only be included as and when its needed imo.

    Thread Starter ssvictors

    (@ssvictors)

    But now .mo files are loaded on every page too because your plugin loads on every page(by including it in wp-settings.php on line 175) and the class is initialized but without locale(with multilanguage plugins, qTranslate for ex.). If single locale is used – all works fine.

    Plugin Author Rincewind

    (@rincewind)

    I see ok I have tried to google this, and wasn’t able to find anything at all on this, still learning how to code wordpress plugins correctly as intended, the wordpress site itself doesn’t mention anything at all about this, but have made the suggest change hope this is what you was wanting and that I did it correctly.

    Thread Starter ssvictors

    (@ssvictors)

    Thank you. Now localization works correctly.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘[Plugin: WP Realtime Sitemap] Initialization issue’ is closed to new replies.