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
This commit is contained in:
Boone Gorges 2014-10-15 15:42:45 +00:00
parent cd19612e1f
commit c995866623

View File

@ -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();