Be a bit more conservative in which args are stripped after redirect_guess_404_permalink(). see #20380.

git-svn-id: http://svn.automattic.com/wordpress/trunk@20386 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
markjaquith 2012-04-06 21:19:28 +00:00
parent 4eca3fb67e
commit 2c87af1983

View File

@ -94,7 +94,7 @@ function redirect_canonical( $requested_url = null, $do_redirect = true ) {
if ( ! $redirect_url ) {
$redirect_url = redirect_guess_404_permalink( $requested_url );
$redirect['query'] = remove_query_arg( array( 'p', 'page_id', 'attachment_id', 'post_type', 'pagename', 'name' ), $redirect['query'] );
$redirect['query'] = remove_query_arg( array( 'post_type', 'pagename', 'name' ), $redirect['query'] );
}
} elseif ( is_object($wp_rewrite) && $wp_rewrite->using_permalinks() ) {