Don't do any taxonomy stuff if is_singular. See #15487
git-svn-id: http://svn.automattic.com/wordpress/trunk@16515 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
01942c8a6c
commit
cbd4ea48ca
|
@ -1593,7 +1593,6 @@ class WP_Query {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( !$this->is_singular() ) {
|
|
||||||
foreach ( $tax_query as $query ) {
|
foreach ( $tax_query as $query ) {
|
||||||
if ( 'IN' == $query['operator'] ) {
|
if ( 'IN' == $query['operator'] ) {
|
||||||
switch ( $query['taxonomy'] ) {
|
switch ( $query['taxonomy'] ) {
|
||||||
|
@ -1608,7 +1607,6 @@ class WP_Query {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
return $tax_query;
|
return $tax_query;
|
||||||
}
|
}
|
||||||
|
@ -1945,6 +1943,7 @@ class WP_Query {
|
||||||
$search = apply_filters_ref_array('posts_search', array( $search, &$this ) );
|
$search = apply_filters_ref_array('posts_search', array( $search, &$this ) );
|
||||||
|
|
||||||
// Taxonomies
|
// Taxonomies
|
||||||
|
if ( !$this->is_singular ) {
|
||||||
$this->tax_query = $this->parse_tax_query( $q );
|
$this->tax_query = $this->parse_tax_query( $q );
|
||||||
if ( !empty( $this->tax_query ) ) {
|
if ( !empty( $this->tax_query ) ) {
|
||||||
$clauses = call_user_func_array( 'get_tax_sql', array( $this->tax_query, $wpdb->posts, 'ID', &$this) );
|
$clauses = call_user_func_array( 'get_tax_sql', array( $this->tax_query, $wpdb->posts, 'ID', &$this) );
|
||||||
|
@ -1989,6 +1988,7 @@ class WP_Query {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if ( !empty( $this->tax_query ) || !empty( $q['meta_key'] ) ) {
|
if ( !empty( $this->tax_query ) || !empty( $q['meta_key'] ) ) {
|
||||||
$groupby = "{$wpdb->posts}.ID";
|
$groupby = "{$wpdb->posts}.ID";
|
||||||
|
|
Loading…
Reference in New Issue