[wp-trac] [WordPress Trac] #16742: Meta query doesn't work with $wp_query->set()

WordPress Trac wp-trac at lists.automattic.com
Thu Mar 24 16:16:05 UTC 2011

#16742: Meta query doesn't work with $wp_query->set()
 Reporter:  scribu                              |       Owner:
     Type:  defect (bug)                        |      Status:  new
 Priority:  normal                              |   Milestone:  3.1.1
Component:  Query                               |     Version:  3.1
 Severity:  normal                              |  Resolution:
 Keywords:  has-patch dev-feedback needs-codex  |

Comment (by ryan):

 I went ahead with the hash cleanup. Please review thoroughly.  The hash is
 now computed at the end of parse_query() right before the parse_query
 action.   It is computed again in get_posts() after pre_get_posts and
 fill_query_vars() have run.  If the hash changed via the parse_query or
 pre_get_posts actions then the query_vars_changed flag is set to true so
 that the tax and meta parsers know to do their thing again. There are no
 other filters or actions that run between when the hash is recomputed and
 when the taxonomy and meta queries are parsed again.

 Tested with init, pre_get_posts, and parse_query hooks that exercised a
 variety of meta and tax queries via set() and get_posts() calls on the
 main query and newly instantiated queries.

Ticket URL: <http://core.trac.wordpress.org/ticket/16742#comment:20>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software

More information about the wp-trac mailing list