Temp fix for canonical redirects of taxonomy links containing non-ASCII bases. Props nbachiyski. see #14201

git-svn-id: https://develop.svn.wordpress.org/trunk@15462 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2010-07-22 20:08:21 +00:00
parent 77d5cf7160
commit 5b9d2135e6
1 changed files with 2 additions and 2 deletions

View File

@ -156,8 +156,8 @@ function redirect_canonical($requested_url=null, $do_redirect=true) {
$obj = $wp_query->get_queried_object();
if ( $term_count <= 1 && !empty($obj->term_id) && ( $tax_url = get_term_link((int)$obj->term_id, $obj->taxonomy) ) && !is_wp_error($tax_url) ) {
if ( $term_count <= 1 && !empty($obj->term_id) && ( $tax_url = get_term_link((int)$obj->term_id, $obj->taxonomy) )
&& !is_wp_error($tax_url) && $redirect['query'] ) {
if ( is_category() ) {
$redirect['query'] = remove_query_arg( array( 'category_name', 'category', 'cat'), $redirect['query']);
} elseif ( is_tag() ) {