Correct logic inversion in Canonical Taxonomy Term links. Fixes #12547

git-svn-id: https://develop.svn.wordpress.org/trunk@13623 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Dion Hulse 2010-03-09 10:07:03 +00:00
parent 91b380571d
commit 242b49b6f2
1 changed files with 1 additions and 1 deletions

View File

@ -141,7 +141,7 @@ 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) ) {
if ( is_category() ) {
$redirect['query'] = remove_query_arg( array( 'category_name', 'category', 'cat'), $redirect['query']);