[wp-trac] [WordPress Trac] #27015: WP_Query::get_queried_object() does not always work in 'pre_get_posts'

WordPress Trac noreply at wordpress.org
Thu Feb 20 20:41:35 UTC 2014


#27015: WP_Query::get_queried_object() does not always work in 'pre_get_posts'
--------------------------+------------------------------
 Reporter:  bcworkz       |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Query         |     Version:  trunk
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |     Focuses:
--------------------------+------------------------------

Comment (by tivnet):

 To reproduce the error that
 [https://core.trac.wordpress.org/attachment/ticket/27015/is_category.patch
 my patch] fixes:
 Call `is_category('example')` within a `pre_get_posts` action, and go to a
 non-existing URL.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/27015#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list