[wp-testers] Problems with get_bloginfo('rss2_url') in WP2.0.5
Mark Jaquith
mark.wordpress at txfx.net
Mon Nov 13 05:50:44 GMT 2006
On Nov 12, 2006, at 5:43 AM, Ajay D'Souza wrote:
> I was using the function get_bloginfo('rss2_url') in a plugin. But
> I get
> this error:
>
> *Fatal error*: Call to a member function on a non-object
You must be calling this before the $wp_rewrite object has been
instantiated. Try delaying your plugin's action until the
plugins_loaded [1] or init [2] hooks.
As a general principle, plugins shouldn't run their code as they're
included. The only things you should really be doing on include is
making add_filter() or add_action() registrations.
--
Mark Jaquith
http://txfx.net/
More information about the wp-testers
mailing list