git-svn-id: http://svn.automattic.com/wordpress/trunk@5974 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
ef5caabe37
commit
9e48d38752
|
@ -65,7 +65,6 @@ function redirect_canonical() {
|
|||
}
|
||||
|
||||
// paging
|
||||
if ( is_paged() && strpos($redirect['query'], 'paged=') !== false ) {
|
||||
if ( $paged = get_query_var('paged') ) {
|
||||
if ( $paged > 1 ) {
|
||||
if ( !$redirect_url )
|
||||
|
@ -81,11 +80,15 @@ function redirect_canonical() {
|
|||
$redirect['query'] = remove_query_arg('paged', $redirect['query']);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// tack on any additional query vars
|
||||
if ( $redirect_url && $redirect['query'] )
|
||||
$redirect_url .= '?' . $redirect['query'];
|
||||
if ( $redirect_url && $redirect['query'] ) {
|
||||
if ( strpos($redirect_url, '?') !== false )
|
||||
$redirect_url .= '&';
|
||||
else
|
||||
$redirect_url .= '?';
|
||||
$redirect_url .= $redirect['query'];
|
||||
}
|
||||
|
||||
if ( !$redirect_url ) { // we're only going down this road if we don't have a WP-generated link from above
|
||||
|
||||
|
|
Loading…
Reference in New Issue