Make WordPress Core

Changeset 15462


Ignore:
Timestamp:
07/22/2010 08:08:21 PM (14 years ago)
Author:
ryan
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/canonical.php

    r15444 r15462  
    157157            $obj = $wp_query->get_queried_object();
    158158
    159             if ( $term_count <= 1 && !empty($obj->term_id) && ( $tax_url = get_term_link((int)$obj->term_id, $obj->taxonomy) ) && !is_wp_error($tax_url) ) {
    160 
     159            if ( $term_count <= 1 && !empty($obj->term_id) && ( $tax_url = get_term_link((int)$obj->term_id, $obj->taxonomy) )
     160                    && !is_wp_error($tax_url) && $redirect['query'] ) {
    161161                if ( is_category() ) {
    162162                    $redirect['query'] = remove_query_arg( array( 'category_name', 'category', 'cat'), $redirect['query']);
Note: See TracChangeset for help on using the changeset viewer.