Properly handled posts with internal paging in Canonical
git-svn-id: https://develop.svn.wordpress.org/trunk@9388 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
54902d42cf
commit
e4a48a0314
@ -85,6 +85,10 @@ function redirect_canonical($requested_url=null, $do_redirect=true) {
|
||||
$redirect['query'] = remove_query_arg('p', $redirect['query']);
|
||||
} elseif ( is_single() && ! $redirect_url ) {
|
||||
$redirect_url = get_permalink( url_to_postid( $requested_url ) );
|
||||
if ( get_query_var( 'page' ) ) {
|
||||
$redirect_url = trailingslashit( $redirect_url ) . user_trailingslashit( get_query_var( 'page' ), 'single_paged' );
|
||||
$redirect['query'] = remove_query_arg( 'page', $redirect['query'] );
|
||||
}
|
||||
} elseif ( is_page() && !empty($_GET['page_id']) && ! $redirect_url ) {
|
||||
if ( $redirect_url = get_permalink(get_query_var('page_id')) )
|
||||
$redirect['query'] = remove_query_arg('page_id', $redirect['query']);
|
||||
|
Loading…
Reference in New Issue
Block a user