Disable Feeds - Version 1.2.1

Version Description

  • Bugfix: Old WordPress feed URLs were not being redirected.
Download this release

Release Info

Developer solarissmoke
Plugin Icon wp plugin Disable Feeds
Version 1.2.1
Comparing to
See all releases

Code changes from version 1.2 to 1.2.1

Files changed (2) hide show
  1. disable-feeds.php +4 -3
  2. readme.txt +5 -2
disable-feeds.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Disable Feeds
4
  Plugin URI: http://wordpress.org/extend/plugins/disable-feeds/
5
  Description: Disable all RSS/Atom feeds on your WordPress site.
6
- Version: 1.2
7
  Author: Samir Shah
8
  Author URI: http://rayofsolaris.net/
9
  License: GPLv2 or later
@@ -55,8 +55,9 @@ class Disable_Feeds {
55
  exit;
56
  }
57
 
58
- set_query_var( 'feed', '' ); // redirect_canonical will do the rest
59
- redirect_canonical();
 
60
  }
61
  else {
62
  $wp_query->is_feed = false;
3
  Plugin Name: Disable Feeds
4
  Plugin URI: http://wordpress.org/extend/plugins/disable-feeds/
5
  Description: Disable all RSS/Atom feeds on your WordPress site.
6
+ Version: 1.2.1
7
  Author: Samir Shah
8
  Author URI: http://rayofsolaris.net/
9
  License: GPLv2 or later
55
  exit;
56
  }
57
 
58
+ if( get_query_var( 'feed' ) !== 'old' ) // WP redirects these anyway, and removing the query var will confuse it thoroughly
59
+ set_query_var( 'feed', '' );
60
+ redirect_canonical(); // Let WP figure out the appropriate redirect URL.
61
  }
62
  else {
63
  $wp_query->is_feed = false;
readme.txt CHANGED
@@ -1,8 +1,8 @@
1
  === Disable Feeds ===
2
  Contributors: solarissmoke
3
  Tags: disable, rss, atom, rdf, feeds
4
- Requires at least: 3.2
5
- Tested up to: 3.5
6
  Stable tag: trunk
7
 
8
  Disables all RSS/Atom/RDF feeds on your WordPress site.
@@ -35,6 +35,9 @@ In `Settings -> Reading` you will find an option to allow global feeds. All othe
35
 
36
  == Changelog ==
37
 
 
 
 
38
  = 1.2 =
39
  * Added the option to allow the global post and comment feeds.
40
 
1
  === Disable Feeds ===
2
  Contributors: solarissmoke
3
  Tags: disable, rss, atom, rdf, feeds
4
+ Requires at least: 3.5
5
+ Tested up to: 3.9
6
  Stable tag: trunk
7
 
8
  Disables all RSS/Atom/RDF feeds on your WordPress site.
35
 
36
  == Changelog ==
37
 
38
+ = 1.2.1 =
39
+ * Bugfix: Old WordPress feed URLs were not being redirected.
40
+
41
  = 1.2 =
42
  * Added the option to allow the global post and comment feeds.
43