Skip to content

Commit c995866

Browse files
committed
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. git-svn-id: https://develop.svn.wordpress.org/trunk@29901 602fd350-edb4-49c9-b593-d223f7449a82
1 parent cd19612 commit c995866

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/wp-includes/canonical.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ function redirect_canonical( $requested_url = null, $do_redirect = true ) {
194194
} elseif ( is_category() || is_tag() || is_tax() ) { // Terms (Tags/categories)
195195

196196
$term_count = 0;
197-
foreach ( $wp_query->tax_query->queries as $tax_query )
197+
foreach ( $wp_query->tax_query->queried_terms as $tax_query )
198198
$term_count += count( $tax_query['terms'] );
199199

200200
$obj = $wp_query->get_queried_object();

0 commit comments

Comments
 (0)