diff --git a/wp-atom.php b/wp-atom.php deleted file mode 100644 index a83ac7db1d..0000000000 --- a/wp-atom.php +++ /dev/null @@ -1,12 +0,0 @@ - diff --git a/wp-commentsrss2.php b/wp-commentsrss2.php deleted file mode 100644 index 280766ed46..0000000000 --- a/wp-commentsrss2.php +++ /dev/null @@ -1,12 +0,0 @@ - diff --git a/wp-feed.php b/wp-feed.php deleted file mode 100644 index afce8cd4c2..0000000000 --- a/wp-feed.php +++ /dev/null @@ -1,12 +0,0 @@ - diff --git a/wp-includes/canonical.php b/wp-includes/canonical.php index ca2eec30c5..26b6ed091c 100644 --- a/wp-includes/canonical.php +++ b/wp-includes/canonical.php @@ -218,11 +218,25 @@ 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/'; - if ( (in_array( get_default_feed(), array( 'rss', 'rdf' ) ) && 'feed' == get_query_var('feed')) || in_array( get_query_var('feed'), array( 'rss', 'rdf' ) ) ) + if ( ( in_array( get_default_feed(), array( 'rss', 'rdf' ) ) && 'feed' == get_query_var('feed') ) || in_array( get_query_var('feed'), array( 'rss', 'rdf' ) ) ) $addl_path .= user_trailingslashit( 'feed/' . ( ( get_default_feed() == 'rss2' ) ? '' : 'rss2' ), 'feed' ); else $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'] ); + } elseif ( is_feed() && 'old' == get_query_var('feed') ) { + $old_feed_files = array( + 'wp-atom.php' => 'atom', + 'wp-commentsrss2.php' => 'comments_rss2', + 'wp-feed.php' => get_default_feed(), + 'wp-rdf.php' => 'rss2', + 'wp-rss.php' => 'rss2', + 'wp-rss2.php' => 'rss2', + ); + if ( isset( $old_feed_files[ basename( $redirect['path'] ) ] ) ) { + $redirect_url = get_feed_link( $old_feed_files[ basename( $redirect['path'] ) ] ); + wp_redirect( $redirect_url, 301 ); + die(); + } } if ( get_query_var('paged') > 0 ) { diff --git a/wp-includes/rewrite.php b/wp-includes/rewrite.php index 841a99396d..c7879ad53f 100644 --- a/wp-includes/rewrite.php +++ b/wp-includes/rewrite.php @@ -1498,13 +1498,8 @@ class WP_Rewrite { $home_path = parse_url( home_url() ); $robots_rewrite = ( empty( $home_path['path'] ) || '/' == $home_path['path'] ) ? array( 'robots\.txt$' => $this->index . '?robots=1' ) : array(); - // Default Feed rules - These are require to allow for the direct access files to work with permalink structure starting with %category% - $default_feeds = array( '.*wp-atom.php$' => $this->index . '?feed=atom', - '.*wp-rdf.php$' => $this->index . '?feed=rss2', - '.*wp-rss.php$' => $this->index . '?feed=rss2', - '.*wp-rss2.php$' => $this->index . '?feed=rss2', - '.*wp-feed.php$' => $this->index . '?feed=feed', - '.*wp-commentsrss2.php$' => $this->index . '?feed=rss2&withcomments=1'); + // Old feed files + $old_feed_files = array( '.*wp-(atom|rdf|rss|rss2|feed|commentsrss2).php$' => $this->index . '?feed=old' ); // Registration rules $registration_pages = array(); @@ -1558,9 +1553,9 @@ class WP_Rewrite { // Put them together. if ( $this->use_verbose_page_rules ) - $this->rules = array_merge($this->extra_rules_top, $robots_rewrite, $default_feeds, $registration_pages, $page_rewrite, $root_rewrite, $comments_rewrite, $search_rewrite, $author_rewrite, $date_rewrite, $post_rewrite, $this->extra_rules); + $this->rules = array_merge($this->extra_rules_top, $robots_rewrite, $old_feed_files, $registration_pages, $page_rewrite, $root_rewrite, $comments_rewrite, $search_rewrite, $author_rewrite, $date_rewrite, $post_rewrite, $this->extra_rules); else - $this->rules = array_merge($this->extra_rules_top, $robots_rewrite, $default_feeds, $registration_pages, $root_rewrite, $comments_rewrite, $search_rewrite, $author_rewrite, $date_rewrite, $post_rewrite, $page_rewrite, $this->extra_rules); + $this->rules = array_merge($this->extra_rules_top, $robots_rewrite, $old_feed_files, $registration_pages, $root_rewrite, $comments_rewrite, $search_rewrite, $author_rewrite, $date_rewrite, $post_rewrite, $page_rewrite, $this->extra_rules); do_action_ref_array('generate_rewrite_rules', array(&$this)); $this->rules = apply_filters('rewrite_rules_array', $this->rules); diff --git a/wp-includes/version.php b/wp-includes/version.php index f07f6f6604..9dd3082e27 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -11,7 +11,7 @@ $wp_version = '3.3-aortic-dissection'; * * @global int $wp_db_version */ -$wp_db_version = 18226; +$wp_db_version = 18537; /** * Holds the TinyMCE version diff --git a/wp-rdf.php b/wp-rdf.php deleted file mode 100644 index cc94ad067c..0000000000 --- a/wp-rdf.php +++ /dev/null @@ -1,12 +0,0 @@ - diff --git a/wp-rss.php b/wp-rss.php deleted file mode 100644 index af2427ad5c..0000000000 --- a/wp-rss.php +++ /dev/null @@ -1,12 +0,0 @@ - diff --git a/wp-rss2.php b/wp-rss2.php deleted file mode 100644 index de75c2398e..0000000000 --- a/wp-rss2.php +++ /dev/null @@ -1,12 +0,0 @@ -