Support nested tax query syntax in redirect_canonical().
The proper place to look for a list of queried terms is in the flat queried_terms array, not in tax_query->queries. See #29738. Built from https://develop.svn.wordpress.org/trunk@29901 git-svn-id: http://core.svn.wordpress.org/trunk@29656 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
16a55620c3
commit
295f5fc9de
|
@ -194,7 +194,7 @@ function redirect_canonical( $requested_url = null, $do_redirect = true ) {
|
|||
} elseif ( is_category() || is_tag() || is_tax() ) { // Terms (Tags/categories)
|
||||
|
||||
$term_count = 0;
|
||||
foreach ( $wp_query->tax_query->queries as $tax_query )
|
||||
foreach ( $wp_query->tax_query->queried_terms as $tax_query )
|
||||
$term_count += count( $tax_query['terms'] );
|
||||
|
||||
$obj = $wp_query->get_queried_object();
|
||||
|
|
Loading…
Reference in New Issue