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

WordPress Trac noreply at wordpress.org
Thu Oct 24 10:15:41 UTC 2013


#25680: is_main_query() _doing_it_wrong() notice suggests using WP_Query statically
--------------------------+------------------
 Reporter:  dd32          |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  3.8
Component:  Text Changes  |     Version:
 Severity:  normal        |  Resolution:
 Keywords:                |
--------------------------+------------------

Comment (by rmccue):

 Maybe something like `In pre_get_posts, use the $query->is_main_query()
 (WP_Query::is_main_query) method, not the is_main_query() function.`.
 Leaves the function name there for those that want it, but removes the
 `()` to indicate you're not meant to call it.

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


More information about the wp-trac mailing list