WordPress.org

Make WordPress Core

Changeset 39625


Ignore:
Timestamp:
12/21/16 03:01:32 (10 months ago)
Author:
boonebgorges
Message:

Taxonomy: Ensure that mods to query vars in pre_term_query callbacks have an effect.

Previously, it was possible to modify the query_vars array, but
the changes would be ignored after pre_term_query had finished
running.

Props jfarthing84.
Fixes #39354.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-term-query.php

    r39057 r39625  
    306306 
    307307        $this->parse_query( $this->query_vars ); 
    308         $args = $this->query_vars; 
     308        $args = &$this->query_vars; 
    309309 
    310310        // Set up meta_query so it's available to 'pre_get_terms'. 
Note: See TracChangeset for help on using the changeset viewer.