Consider only IN tax queries when returning the queried object. See #12891
git-svn-id: http://svn.automattic.com/wordpress/trunk@16531 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
9a23bd6078
commit
06c1418787
|
@ -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