From d10ff2dfc59d24d20a819034716ce03abd843d01 Mon Sep 17 00:00:00 2001 From: Dion Hulse Date: Mon, 19 Apr 2010 12:03:01 +0000 Subject: [PATCH] Canonical redirect to correct location if rss2 is not default feed. wp-feed.php redirection to default feed type instad of rss2. Props solarissmoke. Fixes #13047 git-svn-id: https://develop.svn.wordpress.org/trunk@14162 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-feed.php | 4 ++-- wp-includes/canonical.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/wp-feed.php b/wp-feed.php index 78daa6d226..24cd8d6721 100644 --- a/wp-feed.php +++ b/wp-feed.php @@ -1,12 +1,12 @@ \ No newline at end of file diff --git a/wp-includes/canonical.php b/wp-includes/canonical.php index b4c8fcfe48..7d7da1bc82 100644 --- a/wp-includes/canonical.php +++ b/wp-includes/canonical.php @@ -190,7 +190,7 @@ function redirect_canonical($requested_url=null, $do_redirect=true) { $addl_path = !empty( $addl_path ) ? trailingslashit($addl_path) : ''; if ( get_query_var( 'withcomments' ) ) $addl_path .= 'comments/'; - $addl_path .= user_trailingslashit( 'feed/' . ( ( 'rss2' == get_query_var('feed') || 'feed' == get_query_var('feed') ) ? '' : get_query_var('feed') ), 'feed' ); + $addl_path .= user_trailingslashit( 'feed/' . ( ( get_default_feed() == get_query_var('feed') || 'feed' == get_query_var('feed') ) ? '' : get_query_var('feed') ), 'feed' ); $redirect['query'] = remove_query_arg( 'feed', $redirect['query'] ); }