Don’t use the conditional query tags (is_page, is_post(), is_*) prior to init. In 3.0 and earlier, this merely failed quietly. In 3.1 this will produce a fatal error. We’ll workaround the fatal error prior to the release of 3.1, but in the meantime we’ll leave it to serve as a flag for improper use of the query conditionals. If you see a fatal error of the form “Call to a member function is_*() on a non-object” then a plugin or theme is using that function prior to init. See ticket 14729.
-
Ryan Boren
Reply
mikeschinkel 5:26 pm on August 30, 2010 Permalink |
If they fail, wouldn’t it make sense for them to fail loudly? I guess there’s always WP_DEBUG but how many themers and even plugin devs know about it?
Ryan Hellyer 2:27 pm on August 31, 2010 Permalink |
Does WP_DEBUG pick up on stuff like that anyway? I assumed not – haven’ tested it though.