From 4b984b763dd98b864e733a8914c78e15361d9cca Mon Sep 17 00:00:00 2001 From: Boone Gorges Date: Wed, 21 Dec 2016 03:01:32 +0000 Subject: [PATCH] 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. git-svn-id: https://develop.svn.wordpress.org/trunk@39625 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/class-wp-term-query.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-includes/class-wp-term-query.php b/src/wp-includes/class-wp-term-query.php index 434d810db0..c2915402a9 100644 --- a/src/wp-includes/class-wp-term-query.php +++ b/src/wp-includes/class-wp-term-query.php @@ -305,7 +305,7 @@ class WP_Term_Query { global $wpdb; $this->parse_query( $this->query_vars ); - $args = $this->query_vars; + $args = &$this->query_vars; // Set up meta_query so it's available to 'pre_get_terms'. $this->meta_query = new WP_Meta_Query();