[wp-trac] [WordPress Trac] #23309: Not all WP_Query::query_vars get updated during WP_Query::get_posts()

WordPress Trac noreply at wordpress.org
Mon Jan 28 15:40:57 UTC 2013


#23309: Not all WP_Query::query_vars get updated during WP_Query::get_posts()
-----------------------------+--------------------------
 Reporter:  prettyboymp      |       Type:  defect (bug)
   Status:  new              |   Priority:  normal
Milestone:  Awaiting Review  |  Component:  Query
  Version:                   |   Severity:  normal
 Keywords:                   |
-----------------------------+--------------------------
 There is a lot of logic within the WP_Query::get_posts() method that fills
 in missing query vars with defaults and manipulates others based on the
 rest of the query.  However, some of the final states for many of the
 variables aren't updated in the WP_Query::query_vars array.  For example,
 the post type is lost as a local variable and post_status is used for
 building compiling mysql expressions, but never directly updated.

 The result is that any plugins that want to recreate the query for another
 system, (ie, an external search provider) must directly copy much of the
 business logic that WP_Query::get_posts() has embedded in it in order to
 fill in for the incomplete query_var array.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/23309>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list