WordPress.org

Make WordPress Core

Changeset 12034


Ignore:
Timestamp:
10/15/09 09:13:38 (5 years ago)
Author:
markjaquith
Message:

Do not do a canonical redirect for negated author query strings. fixes #10960

File:
1 edited

Legend:

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

    r11930 r12034  
    129129            if ( $redirect_url = get_category_link(get_query_var('cat')) ) 
    130130                $redirect['query'] = remove_query_arg('cat', $redirect['query']); 
    131         } elseif ( is_author() && !empty($_GET['author']) ) { 
     131        } elseif ( is_author() && !empty($_GET['author']) && preg_match( '|^[0-9]+$|', $_GET['author'] ) ) { 
    132132            $author = get_userdata(get_query_var('author')); 
    133133            if ( false !== $author && $redirect_url = get_author_posts_url($author->ID, $author->user_nicename) ) 
Note: See TracChangeset for help on using the changeset viewer.