From e613d972343be0fa4bd5bd2e5b17f3cbdc196439 Mon Sep 17 00:00:00 2001 From: Boone Gorges Date: Thu, 26 May 2016 14:55:38 +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. git-svn-id: https://develop.svn.wordpress.org/trunk@37576 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/taxonomy.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/wp-includes/taxonomy.php b/src/wp-includes/taxonomy.php index 8a6dae651a..ebc14ff127 100644 --- a/src/wp-includes/taxonomy.php +++ b/src/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 ); } /**