Skip to content

Commit c0917f6

Browse files
author
boonebgorges
committed
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
1 parent 94546a7 commit c0917f6

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/wp-includes/taxonomy.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1206,8 +1206,6 @@ function get_terms( $args = array(), $deprecated = '' ) {
12061206

12071207
$terms = $term_query->query( $args );
12081208

1209-
$taxonomies = isset( $args['taxonomy'] ) ? (array) $args['taxonomy'] : null;
1210-
12111209
/**
12121210
* Filters the found terms.
12131211
*
@@ -1219,7 +1217,7 @@ function get_terms( $args = array(), $deprecated = '' ) {
12191217
* @param array $args An array of get_terms() arguments.
12201218
* @param WP_Term_Query $term_query The WP_Term_Query object.
12211219
*/
1222-
return apply_filters( 'get_terms', $terms, $taxonomies, $args );
1220+
return apply_filters( 'get_terms', $terms, $term_query->query_vars['taxonomy'], $term_query->query_vars, $term_query );
12231221
}
12241222

12251223
/**

0 commit comments

Comments
 (0)