Use correct backreference in obsolete feed redirection code. props sweetie089. fixes #24623.

git-svn-id: http://core.svn.wordpress.org/trunk@24502 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2013-06-22 12:09:28 +00:00
parent 1e83cf5c53
commit 8792da0820
1 changed files with 1 additions and 1 deletions

View File

@ -337,7 +337,7 @@ function redirect_canonical( $requested_url = null, $do_redirect = true ) {
$redirect['query'] = trim(preg_replace( '#(^|&)(p|page_id|cat|tag)=?(&|$)#', '&', $redirect['query']), '&');
// Redirect obsolete feeds
$redirect['query'] = preg_replace( '#(^|&)feed=rss(&|$)#', '$1feed=rss2$3', $redirect['query'] );
$redirect['query'] = preg_replace( '#(^|&)feed=rss(&|$)#', '$1feed=rss2$2', $redirect['query'] );
// Remove redundant leading ampersands
$redirect['query'] = preg_replace( '#^\??&*?#', '', $redirect['query'] );