mirror of
https://github.com/WordPress/WordPress.git
synced 2024-09-29 15:47:38 +02:00
Always call WP_Tax_Query::get_sql(). Fixes #15797
git-svn-id: http://svn.automattic.com/wordpress/trunk@16893 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
70baa41126
commit
0aaef4b1ad
@ -1356,6 +1356,7 @@ class WP_Query {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$this->parse_tax_query( $qv );
|
$this->parse_tax_query( $qv );
|
||||||
|
|
||||||
foreach ( $this->tax_query->queries as $tax_query ) {
|
foreach ( $this->tax_query->queries as $tax_query ) {
|
||||||
if ( 'IN' == $tax_query['operator'] ) {
|
if ( 'IN' == $tax_query['operator'] ) {
|
||||||
switch ( $tax_query['taxonomy'] ) {
|
switch ( $tax_query['taxonomy'] ) {
|
||||||
@ -1935,7 +1936,6 @@ class WP_Query {
|
|||||||
// Taxonomies
|
// Taxonomies
|
||||||
$this->parse_tax_query( $q );
|
$this->parse_tax_query( $q );
|
||||||
|
|
||||||
if ( $this->is_category || $this->is_tag || $this->is_tax ) {
|
|
||||||
$clauses = $this->tax_query->get_sql( $wpdb->posts, 'ID' );
|
$clauses = $this->tax_query->get_sql( $wpdb->posts, 'ID' );
|
||||||
|
|
||||||
$join .= $clauses['join'];
|
$join .= $clauses['join'];
|
||||||
@ -1951,6 +1951,7 @@ class WP_Query {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Back-compat
|
// Back-compat
|
||||||
|
if ( $this->is_category || $this->is_tag || $this->is_tax ) {
|
||||||
$tax_query_in = wp_list_filter( $this->tax_query->queries, array( 'operator' => 'IN' ) );
|
$tax_query_in = wp_list_filter( $this->tax_query->queries, array( 'operator' => 'IN' ) );
|
||||||
if ( !empty( $tax_query_in ) ) {
|
if ( !empty( $tax_query_in ) ) {
|
||||||
if ( !isset( $q['taxonomy'] ) ) {
|
if ( !isset( $q['taxonomy'] ) ) {
|
||||||
|
Loading…
Reference in New Issue
Block a user