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
This commit is contained in:
Boone Gorges 2016-05-26 14:55:38 +00:00
parent 8119c1b473
commit e613d97234
1 changed files with 1 additions and 3 deletions

View File

@ -1206,8 +1206,6 @@ function get_terms( $args = array(), $deprecated = '' ) {
$terms = $term_query->query( $args ); $terms = $term_query->query( $args );
$taxonomies = isset( $args['taxonomy'] ) ? (array) $args['taxonomy'] : null;
/** /**
* Filters the found terms. * Filters the found terms.
* *
@ -1219,7 +1217,7 @@ function get_terms( $args = array(), $deprecated = '' ) {
* @param array $args An array of get_terms() arguments. * @param array $args An array of get_terms() arguments.
* @param WP_Term_Query $term_query The WP_Term_Query object. * @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 );
} }
/** /**