WordPress.org

Make WordPress Core

Changeset 37576


Ignore:
Timestamp:
05/26/2016 02:55:38 PM (3 years ago)
Author:
boonebgorges
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/taxonomy.php

    r37573 r37576  
    12071207    $terms = $term_query->query( $args );
    12081208
    1209     $taxonomies = isset( $args['taxonomy'] ) ? (array) $args['taxonomy'] : null;
    1210 
    12111209    /**
    12121210     * Filters the found terms.
     
    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
Note: See TracChangeset for help on using the changeset viewer.