[wp-trac] [WordPress Trac] #20904: WP_Query instances getting entangled with $wp_query global

WordPress Trac noreply at wordpress.org
Tue Dec 3 20:21:56 UTC 2013


#20904: WP_Query instances getting entangled with $wp_query global
---------------------------------+-----------------------------
 Reporter:  boonebgorges         |       Owner:
     Type:  defect (bug)         |      Status:  new
 Priority:  normal               |   Milestone:  Future Release
Component:  Query                |     Version:
 Severity:  normal               |  Resolution:
 Keywords:  has-patch 3.9-early  |
---------------------------------+-----------------------------
Changes (by nacin):

 * keywords:  has-patch needs-unit-tests => has-patch 3.9-early
 * milestone:  3.8 => Future Release


Comment:

 > And, since secondary WP_Query instances don't paginate in the same way
 as the primary query, the 'page' property on those instances doesn't
 matter much.

 Re-reading this, they don't matter ''much'', but they do matter in some
 cases, right? Like if you're doing your own crazy handling? I am all for
 this change, though it seems minor, given it more or less works fine as-
 is. While it allows WP_Query to be used before init, I'm not sure allowing
 this is actually desirable. Post types aren't registered yet and a lot
 still needs to be initialized.

 I'm wondering if we should tackle this in conjunction with #25349 and
 #9256. I'd be game for a 3.9 overhaul of post data setup, ideally
 untangling these globals in the process.

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


More information about the wp-trac mailing list