[wp-trac] [WordPress Trac] #25680: is_main_query() _doing_it_wrong() notice suggests using WP_Query statically

WordPress Trac noreply at wordpress.org
Sun Sep 20 23:44:31 UTC 2015


#25680: is_main_query() _doing_it_wrong() notice suggests using WP_Query statically
------------------------------+-----------------------------
 Reporter:  dd32              |       Owner:  wonderboymusic
     Type:  defect (bug)      |      Status:  assigned
 Priority:  normal            |   Milestone:  4.4
Component:  Text Changes      |     Version:
 Severity:  normal            |  Resolution:
 Keywords:  has-patch commit  |     Focuses:
------------------------------+-----------------------------
Changes (by DrewAPicture):

 * keywords:   => has-patch commit
 * owner:  DrewAPicture => wonderboymusic


Comment:

 @nacin's suggestion for instead using `WP_Query->is_main_query()` is the
 most elegant solution here. This is done in [attachment:25680.2.diff].

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


More information about the wp-trac mailing list