[wp-trac] [WordPress Trac] #25514: Hook Docs: wp-includes/query.php

WordPress Trac noreply at wordpress.org
Tue Oct 8 19:44:54 UTC 2013


#25514: Hook Docs: wp-includes/query.php
--------------------------+------------------------------
 Reporter:  dougwollison  |       Owner:  DrewAPicture
     Type:  enhancement   |      Status:  reviewing
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Inline Docs   |     Version:
 Severity:  normal        |  Resolution:
 Keywords:  needs-patch   |
--------------------------+------------------------------

Comment (by helen):

 Replying to [comment:13 dougwollison]:
 > "Note: If using conditional tags, use the method versions within the
 passed instance
 > (e.g. $this->is_main_query() instead of is_main_query()). This is
 because the functions
 > like is_main_query() test against the global $wp_query instance, not the
 passed one."

 Works for me in the context of `is_main_query()`, but I don't think it
 globally applies to all conditionals. Maybe you want to alter a nav menu
 item query when you're on a date archive or something.

--
Ticket URL: <http://core.trac.wordpress.org/ticket/25514#comment:14>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list