mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 01:27:36 +01:00
Temp fix for canonical redirects of taxonomy links containing non-ASCII bases. Props nbachiyski. see #14201
git-svn-id: http://svn.automattic.com/wordpress/trunk@15462 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
620ec5d87e
commit
53d9320180
@ -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() ) {
|
||||
|
Loading…
Reference in New Issue
Block a user