Add 'tax_query' as public query var. See #12891
git-svn-id: https://develop.svn.wordpress.org/trunk@15751 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
3e66b217cc
commit
f4ed3e239c
|
@ -1291,6 +1291,8 @@ class WP_Query extends WP_Object_Query {
|
||||||
|
|
||||||
$this->parse_tax_query( $qv );
|
$this->parse_tax_query( $qv );
|
||||||
|
|
||||||
|
debug($this->tax_query);
|
||||||
|
|
||||||
$this->parse_meta_query( $qv );
|
$this->parse_meta_query( $qv );
|
||||||
|
|
||||||
if ( empty($qv['author']) || ($qv['author'] == '0') ) {
|
if ( empty($qv['author']) || ($qv['author'] == '0') ) {
|
||||||
|
@ -1400,7 +1402,11 @@ class WP_Query extends WP_Object_Query {
|
||||||
}
|
}
|
||||||
|
|
||||||
function parse_tax_query( $q ) {
|
function parse_tax_query( $q ) {
|
||||||
|
if ( ! empty( $q['tax_query'] ) && is_array( $q['tax_query'] ) ) {
|
||||||
|
$tax_query = $q['tax_query'];
|
||||||
|
} else {
|
||||||
$tax_query = array();
|
$tax_query = array();
|
||||||
|
}
|
||||||
|
|
||||||
foreach ( $GLOBALS['wp_taxonomies'] as $taxonomy => $t ) {
|
foreach ( $GLOBALS['wp_taxonomies'] as $taxonomy => $t ) {
|
||||||
if ( $t->query_var && !empty( $q[$t->query_var] ) ) {
|
if ( $t->query_var && !empty( $q[$t->query_var] ) ) {
|
||||||
|
|
Loading…
Reference in New Issue