WordPress.org

Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #16742, comment 20


Ignore:
Timestamp:
03/24/11 16:16:50 (3 years ago)
Author:
ryan
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #16742, comment 20

    initial v1  
    1 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. 
     1I 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 query vars 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. 
    22 
    33Tested 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.