WordPress.org

Make WordPress Core

Changeset 16531


Ignore:
Timestamp:
11/22/2010 05:14:47 AM (9 years ago)
Author:
scribu
Message:

Consider only IN tax queries when returning the queried object. See #12891

File:
1 edited

Legend:

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

    r16526 r16531  
    26632663        $this->queried_object_id = 0;
    26642664
    2665         if ( !empty( $this->tax_query ) ) {
    2666             $query = reset( $this->tax_query );
     2665        $tax_query_in = wp_list_filter( $this->tax_query, array( 'operator' => 'IN' ) );
     2666        if ( !empty( $tax_query_in ) ) {
     2667            $query = reset( $tax_query_in );
    26672668
    26682669            if ( 'term_id' == $query['field'] )
Note: See TracChangeset for help on using the changeset viewer.