Version Description
- Remove the comments feed link from the head in WP 4.4 and higher.
Download this release
Release Info
| Developer | solarissmoke |
| Plugin | |
| Version | 1.5 |
| Comparing to | |
| See all releases | |
Code changes from version 1.4.2 to 1.5
- disable-comments.php +8 -3
- 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.
|
| 7 |
Author: Samir Shah
|
| 8 |
Author URI: http://rayofsolaris.net/
|
| 9 |
License: GPL2
|
|
@@ -190,6 +190,10 @@ class Disable_Comments {
|
|
| 190 |
// Filters for front end only
|
| 191 |
else {
|
| 192 |
add_action( 'template_redirect', array( $this, 'check_comment_template' ) );
|
|
|
|
|
|
|
|
|
|
|
|
|
| 193 |
}
|
| 194 |
}
|
| 195 |
|
|
@@ -251,9 +255,10 @@ class Disable_Comments {
|
|
| 251 |
* Remove comment links from the admin bar in a multisite network.
|
| 252 |
*/
|
| 253 |
public function remove_network_comment_links( $wp_admin_bar ) {
|
| 254 |
-
if( $this->networkactive ) {
|
| 255 |
-
foreach( (array) $wp_admin_bar->user->blogs as $blog )
|
| 256 |
$wp_admin_bar->remove_menu( 'blog-' . $blog->userblog_id . '-c' );
|
|
|
|
| 257 |
}
|
| 258 |
else {
|
| 259 |
// We have no way to know whether the plugin is active on other sites, so only remove this one
|
| 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.5
|
| 7 |
Author: Samir Shah
|
| 8 |
Author URI: http://rayofsolaris.net/
|
| 9 |
License: GPL2
|
| 190 |
// Filters for front end only
|
| 191 |
else {
|
| 192 |
add_action( 'template_redirect', array( $this, 'check_comment_template' ) );
|
| 193 |
+
|
| 194 |
+
if( $this->options['remove_everywhere'] ) {
|
| 195 |
+
add_filter( 'feed_links_show_comments_feed', '__return_false' );
|
| 196 |
+
}
|
| 197 |
}
|
| 198 |
}
|
| 199 |
|
| 255 |
* Remove comment links from the admin bar in a multisite network.
|
| 256 |
*/
|
| 257 |
public function remove_network_comment_links( $wp_admin_bar ) {
|
| 258 |
+
if( $this->networkactive && is_user_logged_in() ) {
|
| 259 |
+
foreach( (array) $wp_admin_bar->user->blogs as $blog ) {
|
| 260 |
$wp_admin_bar->remove_menu( 'blog-' . $blog->userblog_id . '-c' );
|
| 261 |
+
}
|
| 262 |
}
|
| 263 |
else {
|
| 264 |
// We have no way to know whether the plugin is active on other sites, so only remove this one
|
readme.txt
CHANGED
|
@@ -68,6 +68,9 @@ These definitions can be made either in your main `wp-config.php` or in your the
|
|
| 68 |
|
| 69 |
== Changelog ==
|
| 70 |
|
|
|
|
|
|
|
|
|
|
| 71 |
= 1.4.2 =
|
| 72 |
* Delay loading of translation text domain until all plugins are loaded. This allows plugins to modify translations.
|
| 73 |
|
| 68 |
|
| 69 |
== Changelog ==
|
| 70 |
|
| 71 |
+
= 1.5 =
|
| 72 |
+
* Remove the comments feed link from the head in WP 4.4 and higher.
|
| 73 |
+
|
| 74 |
= 1.4.2 =
|
| 75 |
* Delay loading of translation text domain until all plugins are loaded. This allows plugins to modify translations.
|
| 76 |
|
