From d904eeb08af038a857691eefde2766ad3522e973 Mon Sep 17 00:00:00 2001 From: Boone Gorges Date: Thu, 26 May 2016 14:56:29 +0000 Subject: [PATCH] Pass the proper values to `get_terms` action. * `$term_query` should be passed. * Second and third params should come from the `$term_query->query_vars` array, so that they're fully parsed. These changes were missed in [37572]. Props flixos90, sebastian.pisula. See #35381. Fixes #36951. Built from https://develop.svn.wordpress.org/trunk@37576 git-svn-id: http://core.svn.wordpress.org/trunk@37544 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/taxonomy.php | 4 +--- wp-includes/version.php | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/wp-includes/taxonomy.php b/wp-includes/taxonomy.php index 8a6dae651a..ebc14ff127 100644 --- a/wp-includes/taxonomy.php +++ b/wp-includes/taxonomy.php @@ -1206,8 +1206,6 @@ function get_terms( $args = array(), $deprecated = '' ) { $terms = $term_query->query( $args ); - $taxonomies = isset( $args['taxonomy'] ) ? (array) $args['taxonomy'] : null; - /** * Filters the found terms. * @@ -1219,7 +1217,7 @@ function get_terms( $args = array(), $deprecated = '' ) { * @param array $args An array of get_terms() arguments. * @param WP_Term_Query $term_query The WP_Term_Query object. */ - return apply_filters( 'get_terms', $terms, $taxonomies, $args ); + return apply_filters( 'get_terms', $terms, $term_query->query_vars['taxonomy'], $term_query->query_vars, $term_query ); } /** diff --git a/wp-includes/version.php b/wp-includes/version.php index b38d4204fc..6f4d8dfaac 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.6-alpha-37575'; +$wp_version = '4.6-alpha-37576'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.