Version Description
- Change the behaviour for comment feed requests. This removes a potential security issue.
Download this release
Release Info
Developer | solarissmoke |
Plugin | Disable Comments |
Version | 1.3.1 |
Comparing to | |
See all releases |
Code changes from version 1.3 to 1.3.1
- disable-comments.php +3 -8
- readme.txt +3 -0
disable-comments.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: Disable Comments
|
4 |
Plugin URI: http://wordpress.org/extend/plugins/disable-comments/
|
5 |
Description: Allows administrators to globally disable comments on their site. Comments can be disabled according to post type.
|
6 |
-
Version: 1.3
|
7 |
Author: Samir Shah
|
8 |
Author URI: http://rayofsolaris.net/
|
9 |
License: GPL2
|
@@ -170,13 +170,8 @@ class Disable_Comments {
|
|
170 |
|
171 |
function filter_query() {
|
172 |
if( is_comment_feed() ) {
|
173 |
-
|
174 |
-
|
175 |
-
exit;
|
176 |
-
}
|
177 |
-
|
178 |
-
set_query_var( 'feed', '' ); // redirect_canonical will do the rest
|
179 |
-
redirect_canonical();
|
180 |
}
|
181 |
}
|
182 |
|
3 |
Plugin Name: Disable Comments
|
4 |
Plugin URI: http://wordpress.org/extend/plugins/disable-comments/
|
5 |
Description: Allows administrators to globally disable comments on their site. Comments can be disabled according to post type.
|
6 |
+
Version: 1.3.1
|
7 |
Author: Samir Shah
|
8 |
Author URI: http://rayofsolaris.net/
|
9 |
License: GPL2
|
170 |
|
171 |
function filter_query() {
|
172 |
if( is_comment_feed() ) {
|
173 |
+
// we are inside a comment feed
|
174 |
+
wp_die( __( 'Comments are closed.' ), '', array( 'response' => 403 ) );
|
|
|
|
|
|
|
|
|
|
|
175 |
}
|
176 |
}
|
177 |
|
readme.txt
CHANGED
@@ -81,6 +81,9 @@ These definitions can be made either in your main `wp-config.php` or in your the
|
|
81 |
|
82 |
== Changelog ==
|
83 |
|
|
|
|
|
|
|
84 |
= 1.3 =
|
85 |
* Move persistent mode filter into a define.
|
86 |
* Add an advanced option to show the theme's comment template even when comments are disabled.
|
81 |
|
82 |
== Changelog ==
|
83 |
|
84 |
+
= 1.3.1 =
|
85 |
+
* Change the behaviour for comment feed requests. This removes a potential security issue.
|
86 |
+
|
87 |
= 1.3 =
|
88 |
* Move persistent mode filter into a define.
|
89 |
* Add an advanced option to show the theme's comment template even when comments are disabled.
|