Make WordPress Core


Ignore:
Timestamp:
09/09/2016 07:48:26 PM (8 years ago)
Author:
boonebgorges
Message:

Query: Eliminate unnecessary wp_list_filter() call in get_queried_object().

The refactor in [30711] swapped out the old queries property for the
new queried_terms, but should also have gotten rid of the now-
superfluous wp_list_filter() call.

Fixes #37962.

File:
1 edited

Legend:

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

    r38585 r38586  
    32583258            } else {
    32593259                // For other tax queries, grab the first term from the first clause.
    3260                 $tax_query_in_and = wp_list_filter( $this->tax_query->queried_terms, array( 'operator' => 'NOT IN' ), 'NOT' );
    3261 
    3262                 if ( ! empty( $tax_query_in_and ) ) {
    3263                     $queried_taxonomies = array_keys( $tax_query_in_and );
     3260                if ( ! empty( $this->tax_query->queried_terms ) ) {
     3261                    $queried_taxonomies = array_keys( $this->tax_query->queried_terms );
    32643262                    $matched_taxonomy = reset( $queried_taxonomies );
    3265                     $query = $tax_query_in_and[ $matched_taxonomy ];
     3263                    $query = $this->tax_query->queried_terms[ $matched_taxonomy ];
    32663264
    32673265                    if ( ! empty( $query['terms'] ) ) {
Note: See TracChangeset for help on using the changeset viewer.