Only redirect categories if one "cat" positive integer is specified. fixes #8784 for trunk
git-svn-id: https://develop.svn.wordpress.org/trunk@10396 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
17eacc240c
commit
07cf58c881
@ -119,7 +119,7 @@ function redirect_canonical($requested_url=null, $do_redirect=true) {
|
||||
} elseif ( is_year() && !empty($_GET['year']) ) {
|
||||
if ( $redirect_url = get_year_link(get_query_var('year')) )
|
||||
$redirect['query'] = remove_query_arg('year', $redirect['query']);
|
||||
} elseif ( is_category() && !empty($_GET['cat']) ) {
|
||||
} elseif ( is_category() && !empty($_GET['cat']) && preg_match( '|^[0-9]+$|', $_GET['cat'] ) ) {
|
||||
if ( $redirect_url = get_category_link(get_query_var('cat')) )
|
||||
$redirect['query'] = remove_query_arg('cat', $redirect['query']);
|
||||
} elseif ( is_author() && !empty($_GET['author']) ) {
|
||||
|
Loading…
Reference in New Issue
Block a user