From 3ef41856bb3bf950257bc0a90e0344b6d11a4fd6 Mon Sep 17 00:00:00 2001 From: Boone Gorges Date: Wed, 21 Dec 2016 03:02:40 +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. Built from https://develop.svn.wordpress.org/trunk@39625 git-svn-id: http://core.svn.wordpress.org/trunk@39565 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/class-wp-term-query.php | 2 +- wp-includes/version.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-includes/class-wp-term-query.php b/wp-includes/class-wp-term-query.php index 434d810db0..c2915402a9 100644 --- a/wp-includes/class-wp-term-query.php +++ b/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(); diff --git a/wp-includes/version.php b/wp-includes/version.php index 68891eb6dc..be4cce8d97 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.8-alpha-39624'; +$wp_version = '4.8-alpha-39625'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.