WordPress.org

Make WordPress Core


Ignore:
Timestamp:
06/04/2016 12:19:15 PM (4 years ago)
Author:
boonebgorges
Message:

Taxonomy: No, really, don't pass results of 'count' query through 'get_terms' filter.

[37623] used the wrong parameter name (count=true instead of fields=count).

For greater flexibility and forward compatibility with other potential changes
to the return value of get_terms(), we now do a looser check: any non-array
value is excluded from the filter.

Fixes #36992.

File:
1 edited

Legend:

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

    r37623 r37634  
    12101210
    12111211    // Count queries are not filtered, for legacy reasons.
    1212     if ( $term_query->query_vars['count'] ) {
     1212    if ( ! is_array( $terms ) ) {
    12131213        return $terms;
    12141214    }
Note: See TracChangeset for help on using the changeset viewer.