Canonical: Revert [47937] pending unit tests and further review.
Props needle. See #12456. git-svn-id: https://develop.svn.wordpress.org/trunk@48026 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
2efbc51712
commit
96da995104
@ -409,17 +409,6 @@ function redirect_canonical( $requested_url = null, $do_redirect = true ) {
|
||||
}
|
||||
|
||||
$redirect['query'] = remove_query_arg( 'page', $redirect['query'] );
|
||||
} elseif ( is_singular() && empty( get_query_var( 'name' ) ) && $post_id ) {
|
||||
/*
|
||||
* Redirect example.org/%post_id%/ to canonical url.
|
||||
* @ticket 12456
|
||||
*/
|
||||
$redirect_url = get_permalink( $post_id );
|
||||
$redirect['query'] = _remove_qs_args_if_not_in_url(
|
||||
$redirect['query'],
|
||||
array( 'p', 'page_id', 'attachment_id', 'pagename', 'name', 'post_type' ),
|
||||
$redirect_url
|
||||
);
|
||||
}
|
||||
|
||||
// Paging and feeds.
|
||||
|
Loading…
Reference in New Issue
Block a user