[wp-trac] [WordPress Trac] #16545: Direct WP_Query::get_posts() calls can break
WordPress Trac
wp-trac at lists.automattic.com
Sun Feb 13 16:07:20 UTC 2011
#16545: Direct WP_Query::get_posts() calls can break
-----------------------------+------------------
Reporter: nacin | Owner:
Type: defect (bug) | Status: new
Priority: highest omg bbq | Milestone: 3.1
Component: Query | Version: 3.1
Severity: blocker | Resolution:
Keywords: |
-----------------------------+------------------
Comment (by ryan):
Avoids calling init() from parse_query() and stomping query vars that have
been set(). query() now handles init() and query/query_vars setup. The
$query arg to parse_query() is now optional. It is never passed by core
code and could probably be gotten rid of, but it is still handled in case
a plugin is calling it directly for whatever mysterious reason.
Note that using the set(), get_posts() style requires running init()
yourself if you want to do another query with the same query object . This
was true in 3.0 as well.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/16545#comment:8>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list