mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2025-10-16 12:05:38 +00:00
Properly handle paged permalink URLs even when we are not already 301ing. fixes #20385
git-svn-id: https://develop.svn.wordpress.org/trunk@20397 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
c435aab67e
commit
b033c7c6fa
@ -209,7 +209,9 @@ function redirect_canonical( $requested_url = null, $do_redirect = true ) {
|
||||
}
|
||||
|
||||
// Post Paging
|
||||
if ( is_singular() && get_query_var('page') && $redirect_url ) {
|
||||
if ( is_singular() && get_query_var('page') ) {
|
||||
if ( !$redirect_url )
|
||||
$redirect_url = get_permalink( get_queried_object_id() );
|
||||
$redirect_url = trailingslashit( $redirect_url ) . user_trailingslashit( get_query_var( 'page' ), 'single_paged' );
|
||||
$redirect['query'] = remove_query_arg( 'page', $redirect['query'] );
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user