Permalink
Browse files

Redirect ancient wp-*.php feed files. fixes #4604

git-svn-id: http://svn.automattic.com/wordpress/trunk@9158 1a063a9b-81f0-0310-95a4-ce76da25c4cd
  • Loading branch information...
1 parent 9936ab0 commit 1033c29346f65001eefa644dd6d67baa385b72f2 markjaquith committed Oct 14, 2008
Showing with 25 additions and 88 deletions.
  1. +4 −13 wp-atom.php
  2. +4 −15 wp-commentsrss2.php
  3. +5 −17 wp-feed.php
  4. +4 −15 wp-rdf.php
  5. +4 −15 wp-rss.php
  6. +4 −13 wp-rss2.php
View
@@ -1,21 +1,12 @@
<?php
/**
- * Outputs the Atom feed XML format using the feed-atom.php file in wp-includes
- * folder. This file only sets the feed format and includes the feed-atom.php.
- *
- * This file is no longer used in WordPress and while it is not deprecated now.
- * This file will most likely be deprecated or removed in a later version.
- *
- * The link for the atom feed is /index.php?feed=atom with permalinks off.
+ * Redirects to the Atom feed
+ * This file is deprecated and only exists for backwards compatibility
*
* @package WordPress
*/
-if (empty($wp)) {
- require_once('./wp-load.php');
- wp('feed=atom');
-}
-
-require (ABSPATH . WPINC . '/feed-atom.php');
+require( './wp-load.php' );
+wp_redirect( get_bloginfo( 'atom_url' ), 301 );
?>
View
@@ -1,23 +1,12 @@
<?php
/**
- * Outputs the RSS2 XML format comment feed using the feed-rss2.php file in
- * wp-includes folder. This file only sets the feed format and includes the
- * feed-rss2-comments.php.
- *
- * This file is no longer used in WordPress and while it is not deprecated now.
- * This file will most likely be deprecated or removed in a later version.
- *
- * The link for the rss2 comment feed is /index.php?feed=rss2&withcomments=1
- * with permalinks off.
+ * Redirects to the Comments RSS2 feed
+ * This file is deprecated and only exists for backwards compatibility
*
* @package WordPress
*/
-if (empty($wp)) {
- require_once('./wp-load.php');
- wp('feed=rss2&withcomments=1');
-}
-
-require (ABSPATH . WPINC . '/feed-rss2-comments.php');
+require( './wp-load.php' );
+wp_redirect( get_bloginfo( 'comments_rss2_url' ), 301 );
?>
View
@@ -1,24 +1,12 @@
<?php
/**
- * Outputs the RSS2 feed XML format. This file is a shortcut or compatibility
- * layer for easily finding the RSS feed for the site. It loads WordPress using
- * the wp-blog-header.php file and running do_feed() function.
- *
- * @see do_feed() Used to display the RSS2 feed
- *
- * This file is no longer used in WordPress and while it is not deprecated now.
- * This file will most likely be deprecated or removed in a later version.
- *
- * The link for the rss2 feed is /index.php?feed=rss2 with permalinks off.
+ * Redirects to the RSS2 feed
+ * This file is deprecated and only exists for backwards compatibility
*
* @package WordPress
*/
-if (empty($doing_rss)) {
- $doing_rss = 1;
- require(dirname(__FILE__) . '/wp-blog-header.php');
-}
-
-do_feed();
+require( './wp-load.php' );
+wp_redirect( get_bloginfo( 'rss2_url' ), 301 );
-?>
+?>
View
@@ -1,23 +1,12 @@
<?php
/**
- * Outputs the RDF feed using the feed-rdf.php
- * file in wp-includes folder.
- *
- * This file only sets the feed format and includes the
- * feed-rdf.php.
- *
- * This file is no longer used in WordPress and while it is
- * not deprecated now. This file will most likely be
- * deprecated or removed in a later version.
+ * Redirects to the RDF feed
+ * This file is deprecated and only exists for backwards compatibility
*
* @package WordPress
*/
-if (empty($wp)) {
- require_once('./wp-load.php');
- wp('feed=rdf');
-}
-
-require (ABSPATH . WPINC . '/feed-rdf.php');
+require( './wp-load.php' );
+wp_redirect( get_bloginfo( 'rdf_url' ), 301 );
?>
View
@@ -1,23 +1,12 @@
<?php
/**
- * Outputs the RSS feed RDF format using the feed-rss.php
- * file in wp-includes folder.
- *
- * This file only sets the feed format and includes the
- * feed-rss.php.
- *
- * This file is no longer used in WordPress and while it is
- * not deprecated now. This file will most likely be
- * deprecated or removed in a later version.
+ * Redirects to the RSS feed
+ * This file is deprecated and only exists for backwards compatibility
*
* @package WordPress
*/
-if (empty($wp)) {
- require_once('./wp-load.php');
- wp('feed=rss');
-}
-
-require (ABSPATH . WPINC . '/feed-rss.php');
+require( './wp-load.php' );
+wp_redirect( get_bloginfo( 'rss_url' ), 301 );
?>
View
@@ -1,21 +1,12 @@
<?php
/**
- * Outputs the RSS2 feed XML format using the feed-rss2.php file in wp-includes
- * folder. This file only sets the feed format and includes the feed-rss2.php.
- *
- * This file is no longer used in WordPress and while it is not deprecated now.
- * This file will most likely be deprecated or removed in a later version.
- *
- * The link for the rss2 feed is /index.php?feed=rss2 with permalinks off.
+ * Redirects to the RSS2 feed
+ * This file is deprecated and only exists for backwards compatibility
*
* @package WordPress
*/
-if (empty($wp)) {
- require_once('./wp-load.php');
- wp('feed=rss2');
-}
-
-require (ABSPATH . WPINC . '/feed-rss2.php');
+require( './wp-load.php' );
+wp_redirect( get_bloginfo( 'rss2_url' ), 301 );
?>

0 comments on commit 1033c29

Please sign in to comment.