Do not set is_category/is_tax/is_tax for is_singular requests. props mtekk. fixes #15487
git-svn-id: http://svn.automattic.com/wordpress/trunk@16495 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
d352c9064b
commit
d1d83710e7
|
@ -1591,17 +1591,19 @@ class WP_Query {
|
|||
);
|
||||
}
|
||||
|
||||
foreach ( $tax_query as $query ) {
|
||||
if ( 'IN' == $query['operator'] ) {
|
||||
switch ( $query['taxonomy'] ) {
|
||||
case 'category':
|
||||
$this->is_category = true;
|
||||
break;
|
||||
case 'post_tag':
|
||||
$this->is_tag = true;
|
||||
break;
|
||||
default:
|
||||
$this->is_tax = true;
|
||||
if ( !$this->is_singular() ) {
|
||||
foreach ( $tax_query as $query ) {
|
||||
if ( 'IN' == $query['operator'] ) {
|
||||
switch ( $query['taxonomy'] ) {
|
||||
case 'category':
|
||||
$this->is_category = true;
|
||||
break;
|
||||
case 'post_tag':
|
||||
$this->is_tag = true;
|
||||
break;
|
||||
default:
|
||||
$this->is_tax = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue