Consider only IN tax queries when returning the queried object. See #12891
git-svn-id: https://develop.svn.wordpress.org/trunk@16531 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
250c2d591e
commit
6df13c0a90
@ -2662,8 +2662,9 @@ class WP_Query {
|
||||
$this->queried_object = NULL;
|
||||
$this->queried_object_id = 0;
|
||||
|
||||
if ( !empty( $this->tax_query ) ) {
|
||||
$query = reset( $this->tax_query );
|
||||
$tax_query_in = wp_list_filter( $this->tax_query, array( 'operator' => 'IN' ) );
|
||||
if ( !empty( $tax_query_in ) ) {
|
||||
$query = reset( $tax_query_in );
|
||||
|
||||
if ( 'term_id' == $query['field'] )
|
||||
$term = get_term( reset( $query['terms'] ), $query['taxonomy'] );
|
||||
|
Loading…
Reference in New Issue
Block a user