Disable Comments - Version 2.3.5

Version Description

Download this release

Release Info

Developer wpdevteam
Plugin Icon 128x128 Disable Comments
Version 2.3.5
Comparing to
See all releases

Code changes from version 2.3.4 to 2.3.5

Files changed (4) hide show
  1. disable-comments.php +13 -6
  2. includes/cli.php +38 -3
  3. languages/disable-comments.pot +30 -14
  4. readme.txt +411 -407
disable-comments.php CHANGED
@@ -4,7 +4,7 @@
4
  * Plugin Name: Disable Comments
5
  * Plugin URI: https://wordpress.org/plugins/disable-comments/
6
  * Description: Allows administrators to globally disable comments on their site. Comments can be disabled according to post type. You could bulk delete comments using Tools.
7
- * Version: 2.3.4
8
  * Author: WPDeveloper
9
  * Author URI: https://wpdeveloper.com
10
  * License: GPL-3.0+
@@ -37,7 +37,7 @@ class Disable_Comments
37
 
38
  function __construct()
39
  {
40
- define('DC_VERSION', '2.3.4');
41
  define('DC_PLUGIN_SLUG', 'disable_comments_settings');
42
  define('DC_PLUGIN_ROOT_PATH', dirname(__FILE__));
43
  define('DC_PLUGIN_VIEWS_PATH', DC_PLUGIN_ROOT_PATH . '/views/');
@@ -294,7 +294,7 @@ class Disable_Comments
294
  private function init_filters()
295
  {
296
  // These need to happen now.
297
- if ($this->options['remove_everywhere']) {
298
  add_action('widgets_init', array($this, 'disable_rc_widget'));
299
  add_filter('wp_headers', array($this, 'filter_wp_headers'));
300
  add_action('template_redirect', array($this, 'filter_query'), 9); // before redirect_canonical.
@@ -382,7 +382,7 @@ class Disable_Comments
382
  add_action('admin_notices', array($this, 'discussion_notice'));
383
  add_filter('plugin_row_meta', array($this, 'set_plugin_meta'), 10, 2);
384
 
385
- if ($this->options['remove_everywhere']) {
386
  add_action('admin_menu', array($this, 'filter_admin_menu'), 9999); // do this as late as possible.
387
  add_action('admin_print_styles-index.php', array($this, 'admin_css'));
388
  add_action('admin_print_styles-profile.php', array($this, 'admin_css'));
@@ -900,6 +900,9 @@ class Disable_Comments
900
  }
901
  $old_options = $this->options;
902
  $this->options = [];
 
 
 
903
 
904
  $this->options['is_network_admin'] = isset($formArray['is_network_admin']) && $formArray['is_network_admin'] == '1' ? true : false;
905
 
@@ -985,7 +988,11 @@ class Disable_Comments
985
  global $deletedPostTypeNames;
986
  $log = '';
987
  $nonce = (isset($_POST['nonce']) ? $_POST['nonce'] : '');
988
- $formArray = $this->form_data_modify($_POST['data']);
 
 
 
 
989
 
990
  if (($this->is_CLI && !empty($_args)) || wp_verify_nonce($nonce, 'disable_comments_save_settings')) {
991
  if ( !empty($formArray['is_network_admin']) && function_exists( 'get_sites' ) && class_exists( 'WP_Site_Query' ) ) {
@@ -1105,7 +1112,7 @@ class Disable_Comments
1105
  $wpdb->query("OPTIMIZE TABLE $wpdb->commentmeta");
1106
  $wpdb->query("OPTIMIZE TABLE $wpdb->comments");
1107
 
1108
- $log = __('All spam comments have been deleted', 'disable-comments');
1109
  }
1110
  }
1111
  delete_transient('wc_count_comments');
4
  * Plugin Name: Disable Comments
5
  * Plugin URI: https://wordpress.org/plugins/disable-comments/
6
  * Description: Allows administrators to globally disable comments on their site. Comments can be disabled according to post type. You could bulk delete comments using Tools.
7
+ * Version: 2.3.5
8
  * Author: WPDeveloper
9
  * Author URI: https://wpdeveloper.com
10
  * License: GPL-3.0+
37
 
38
  function __construct()
39
  {
40
+ define('DC_VERSION', '2.3.5');
41
  define('DC_PLUGIN_SLUG', 'disable_comments_settings');
42
  define('DC_PLUGIN_ROOT_PATH', dirname(__FILE__));
43
  define('DC_PLUGIN_VIEWS_PATH', DC_PLUGIN_ROOT_PATH . '/views/');
294
  private function init_filters()
295
  {
296
  // These need to happen now.
297
+ if (!empty($this->options['remove_everywhere'])) {
298
  add_action('widgets_init', array($this, 'disable_rc_widget'));
299
  add_filter('wp_headers', array($this, 'filter_wp_headers'));
300
  add_action('template_redirect', array($this, 'filter_query'), 9); // before redirect_canonical.
382
  add_action('admin_notices', array($this, 'discussion_notice'));
383
  add_filter('plugin_row_meta', array($this, 'set_plugin_meta'), 10, 2);
384
 
385
+ if (!empty($this->options['remove_everywhere'])) {
386
  add_action('admin_menu', array($this, 'filter_admin_menu'), 9999); // do this as late as possible.
387
  add_action('admin_print_styles-index.php', array($this, 'admin_css'));
388
  add_action('admin_print_styles-profile.php', array($this, 'admin_css'));
900
  }
901
  $old_options = $this->options;
902
  $this->options = [];
903
+ if($this->is_CLI){
904
+ $this->options = $old_options;
905
+ }
906
 
907
  $this->options['is_network_admin'] = isset($formArray['is_network_admin']) && $formArray['is_network_admin'] == '1' ? true : false;
908
 
988
  global $deletedPostTypeNames;
989
  $log = '';
990
  $nonce = (isset($_POST['nonce']) ? $_POST['nonce'] : '');
991
+ if (!empty($_args)) {
992
+ $formArray = wp_parse_args($_args);
993
+ } else {
994
+ $formArray = (isset($_POST['data']) ? $this->form_data_modify($_POST['data']) : []);
995
+ }
996
 
997
  if (($this->is_CLI && !empty($_args)) || wp_verify_nonce($nonce, 'disable_comments_save_settings')) {
998
  if ( !empty($formArray['is_network_admin']) && function_exists( 'get_sites' ) && class_exists( 'WP_Site_Query' ) ) {
1112
  $wpdb->query("OPTIMIZE TABLE $wpdb->commentmeta");
1113
  $wpdb->query("OPTIMIZE TABLE $wpdb->comments");
1114
 
1115
+ $log = __('All spam comments have been deleted.', 'disable-comments');
1116
  }
1117
  }
1118
  delete_transient('wc_count_comments');
includes/cli.php CHANGED
@@ -46,6 +46,12 @@ class Disable_Comment_Command
46
  'description' => 'Uncheck specified checkbox in `On Specific Post Types.', // uncheck specified checkbox in `On Specific Post Types:`
47
  'optional' => true,
48
  ),
 
 
 
 
 
 
49
  );
50
  if ($this->dc_instance->networkactive){
51
  $disable_synopsis[] = array(
@@ -81,6 +87,12 @@ wp disable-comments settings --xmlrpc=false --rest-api=false ",
81
  'optional' => true,
82
  'options' => $comment_types,
83
  ),
 
 
 
 
 
 
84
  );
85
  if (!$this->dc_instance->networkactive){
86
  $delete_synopsis[] = array(
@@ -116,6 +128,7 @@ wp disable-comments delete --comment-types=comment "
116
  $extra_post_types = WP_CLI\Utils\get_flag_value($assoc_args, 'extra-post-types');
117
  $remove_xmlrpc_comments = WP_CLI\Utils\get_flag_value($assoc_args, 'xmlrpc');
118
  $remove_rest_API_comments = WP_CLI\Utils\get_flag_value($assoc_args, 'rest-api');
 
119
 
120
  if ($types === 'all') {
121
  $disable_comments_settings['mode'] = 'remove_everywhere';
@@ -150,11 +163,30 @@ wp disable-comments delete --comment-types=comment "
150
 
151
  if(isset($remove_xmlrpc_comments)){
152
  $disable_comments_settings['remove_xmlrpc_comments'] = $remove_xmlrpc_comments;
153
- $msg .= __( 'Disable Comments via XML-RPC. ', 'disable-comments' );
 
 
 
 
 
154
  }
155
  if(isset($remove_rest_API_comments)){
156
  $disable_comments_settings['remove_rest_API_comments'] = $remove_rest_API_comments;
157
- $msg .= __( 'Disable Comments via REST API. ', 'disable-comments' );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
158
  }
159
 
160
  $this->dc_instance->disable_comments_settings($disable_comments_settings);
@@ -174,6 +206,7 @@ wp disable-comments delete --comment-types=comment "
174
  $selected_delete_types = WP_CLI\Utils\get_flag_value($assoc_args, 'types');
175
  $delete_extra_post_types = WP_CLI\Utils\get_flag_value($assoc_args, 'extra-post-types');
176
  $delete_comment_types = WP_CLI\Utils\get_flag_value($assoc_args, 'comment-types');
 
177
 
178
 
179
  if ( $delete_comment_types === 'all' || $selected_delete_types === 'all' ) {
@@ -184,6 +217,8 @@ wp disable-comments delete --comment-types=comment "
184
  } elseif(!empty($delete_comment_types)) {
185
  $delete_comments_settings['delete_mode'] = 'selected_delete_comment_types';
186
  $delete_comments_settings['delete_comment_types'] = array_map('trim', explode(',', $delete_comment_types));
 
 
187
  } else{
188
  WP_CLI::error("Please provide valid parameters. \nSee 'wp help dc delete' for more information.");
189
  }
@@ -194,6 +229,6 @@ wp disable-comments delete --comment-types=comment "
194
  }
195
 
196
  $logged_msg = $this->dc_instance->delete_comments_settings($delete_comments_settings);
197
- WP_CLI::success( implode( "\n", $logged_msg ) );
198
  }
199
  }
46
  'description' => 'Uncheck specified checkbox in `On Specific Post Types.', // uncheck specified checkbox in `On Specific Post Types:`
47
  'optional' => true,
48
  ),
49
+ array(
50
+ 'type' => 'flag',
51
+ 'name' => 'disable-avatar',
52
+ 'description' => 'This will change Avatar state from your entire site.', // uncheck specified checkbox in `On Specific Post Types:`
53
+ 'optional' => true,
54
+ ),
55
  );
56
  if ($this->dc_instance->networkactive){
57
  $disable_synopsis[] = array(
87
  'optional' => true,
88
  'options' => $comment_types,
89
  ),
90
+ array(
91
+ 'type' => 'flag',
92
+ 'name' => 'spam',
93
+ 'description' => 'Permanently delete all spam comments on your WordPress website.',
94
+ 'optional' => true,
95
+ ),
96
  );
97
  if (!$this->dc_instance->networkactive){
98
  $delete_synopsis[] = array(
128
  $extra_post_types = WP_CLI\Utils\get_flag_value($assoc_args, 'extra-post-types');
129
  $remove_xmlrpc_comments = WP_CLI\Utils\get_flag_value($assoc_args, 'xmlrpc');
130
  $remove_rest_API_comments = WP_CLI\Utils\get_flag_value($assoc_args, 'rest-api');
131
+ $disable_avatar = WP_CLI\Utils\get_flag_value($assoc_args, 'disable-avatar');
132
 
133
  if ($types === 'all') {
134
  $disable_comments_settings['mode'] = 'remove_everywhere';
163
 
164
  if(isset($remove_xmlrpc_comments)){
165
  $disable_comments_settings['remove_xmlrpc_comments'] = $remove_xmlrpc_comments;
166
+ if($remove_xmlrpc_comments && $remove_xmlrpc_comments !== 'false'){
167
+ $msg .= __( 'Disable Comments via XML-RPC. ', 'disable-comments' );
168
+ }
169
+ else{
170
+ $msg .= __( 'Enabled Comments via XML-RPC. ', 'disable-comments' );
171
+ }
172
  }
173
  if(isset($remove_rest_API_comments)){
174
  $disable_comments_settings['remove_rest_API_comments'] = $remove_rest_API_comments;
175
+ if($remove_rest_API_comments && $remove_rest_API_comments !== 'false'){
176
+ $msg .= __( 'Disable Comments via REST API. ', 'disable-comments' );
177
+ }
178
+ else{
179
+ $msg .= __( 'Enabled Comments via REST API. ', 'disable-comments' );
180
+ }
181
+ }
182
+ if($disable_avatar != null){
183
+ $disable_comments_settings['disable_avatar'] = $disable_avatar;
184
+ if($disable_avatar && $disable_avatar !== 'false'){
185
+ $msg .= __( 'Disabled Avatar on your entire site. ', 'disable-comments' );
186
+ }
187
+ else{
188
+ $msg .= __( 'Enabled Avatar on your entire site. ', 'disable-comments' );
189
+ }
190
  }
191
 
192
  $this->dc_instance->disable_comments_settings($disable_comments_settings);
206
  $selected_delete_types = WP_CLI\Utils\get_flag_value($assoc_args, 'types');
207
  $delete_extra_post_types = WP_CLI\Utils\get_flag_value($assoc_args, 'extra-post-types');
208
  $delete_comment_types = WP_CLI\Utils\get_flag_value($assoc_args, 'comment-types');
209
+ $delete_spam_types = WP_CLI\Utils\get_flag_value($assoc_args, 'spam');
210
 
211
 
212
  if ( $delete_comment_types === 'all' || $selected_delete_types === 'all' ) {
217
  } elseif(!empty($delete_comment_types)) {
218
  $delete_comments_settings['delete_mode'] = 'selected_delete_comment_types';
219
  $delete_comments_settings['delete_comment_types'] = array_map('trim', explode(',', $delete_comment_types));
220
+ } elseif(!empty($delete_spam_types)) {
221
+ $delete_comments_settings['delete_mode'] = 'delete_spam';
222
  } else{
223
  WP_CLI::error("Please provide valid parameters. \nSee 'wp help dc delete' for more information.");
224
  }
229
  }
230
 
231
  $logged_msg = $this->dc_instance->delete_comments_settings($delete_comments_settings);
232
+ WP_CLI::success( is_array($logged_msg) ? implode( "\n", $logged_msg ) : $logged_msg );
233
  }
234
  }
languages/disable-comments.pot CHANGED
@@ -2,9 +2,9 @@
2
  # This file is distributed under the GPL-3.0+.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: Disable Comments 2.3.4\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/disable-comments\n"
7
- "POT-Creation-Date: 2022-03-28 05:58:59+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=utf-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
@@ -86,21 +86,21 @@ msgstr ""
86
  msgid "Default (no type)"
87
  msgstr ""
88
 
89
- #: disable-comments.php:969
90
  msgid "Saved"
91
  msgstr ""
92
 
93
- #: disable-comments.php:1040 disable-comments.php:1074
94
- #: disable-comments.php:1097
95
  msgid "All comments have been deleted"
96
  msgstr ""
97
 
98
- #: disable-comments.php:1042 disable-comments.php:1046
99
  msgid "Internal error occured. Please try again later."
100
  msgstr ""
101
 
102
- #: disable-comments.php:1108
103
- msgid "All spam comments have been deleted"
104
  msgstr ""
105
 
106
  #: includes/class-plugin-usage-tracker.php:378
@@ -171,33 +171,49 @@ msgstr ""
171
  msgid "Just Deactivate"
172
  msgstr ""
173
 
174
- #: includes/cli.php:122
175
  msgid "Comments is disabled everywhere. "
176
  msgstr ""
177
 
178
- #: includes/cli.php:128 includes/cli.php:132
179
  #. translators: %s: post types to be disabled
180
  msgid "Comments disabled for %s. "
181
  msgstr ""
182
 
183
- #: includes/cli.php:137
184
  #. translators: %s: post types to be enabled
185
  msgid "Comments enabled for %s. "
186
  msgstr ""
187
 
188
- #: includes/cli.php:148
189
  #. translators: %s: post types to be disabled in network
190
  msgid "Custom post types: %s. "
191
  msgstr ""
192
 
193
- #: includes/cli.php:153
194
  msgid "Disable Comments via XML-RPC. "
195
  msgstr ""
196
 
197
- #: includes/cli.php:157
 
 
 
 
198
  msgid "Disable Comments via REST API. "
199
  msgstr ""
200
 
 
 
 
 
 
 
 
 
 
 
 
 
201
  #: views/partials/_delete.php:15 views/partials/_delete.php:19
202
  #: views/partials/_disable.php:19 views/partials/_disable.php:28
203
  #: views/partials/_disable.php:33 views/partials/_disable.php:64
2
  # This file is distributed under the GPL-3.0+.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: Disable Comments 2.3.5\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/disable-comments\n"
7
+ "POT-Creation-Date: 2022-04-27 10:38:37+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=utf-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
86
  msgid "Default (no type)"
87
  msgstr ""
88
 
89
+ #: disable-comments.php:972
90
  msgid "Saved"
91
  msgstr ""
92
 
93
+ #: disable-comments.php:1047 disable-comments.php:1081
94
+ #: disable-comments.php:1104
95
  msgid "All comments have been deleted"
96
  msgstr ""
97
 
98
+ #: disable-comments.php:1049 disable-comments.php:1053
99
  msgid "Internal error occured. Please try again later."
100
  msgstr ""
101
 
102
+ #: disable-comments.php:1115
103
+ msgid "All spam comments have been deleted."
104
  msgstr ""
105
 
106
  #: includes/class-plugin-usage-tracker.php:378
171
  msgid "Just Deactivate"
172
  msgstr ""
173
 
174
+ #: includes/cli.php:135
175
  msgid "Comments is disabled everywhere. "
176
  msgstr ""
177
 
178
+ #: includes/cli.php:141 includes/cli.php:145
179
  #. translators: %s: post types to be disabled
180
  msgid "Comments disabled for %s. "
181
  msgstr ""
182
 
183
+ #: includes/cli.php:150
184
  #. translators: %s: post types to be enabled
185
  msgid "Comments enabled for %s. "
186
  msgstr ""
187
 
188
+ #: includes/cli.php:161
189
  #. translators: %s: post types to be disabled in network
190
  msgid "Custom post types: %s. "
191
  msgstr ""
192
 
193
+ #: includes/cli.php:167
194
  msgid "Disable Comments via XML-RPC. "
195
  msgstr ""
196
 
197
+ #: includes/cli.php:170
198
+ msgid "Enabled Comments via XML-RPC. "
199
+ msgstr ""
200
+
201
+ #: includes/cli.php:176
202
  msgid "Disable Comments via REST API. "
203
  msgstr ""
204
 
205
+ #: includes/cli.php:179
206
+ msgid "Enabled Comments via REST API. "
207
+ msgstr ""
208
+
209
+ #: includes/cli.php:185
210
+ msgid "Disabled Avatar on your entire site. "
211
+ msgstr ""
212
+
213
+ #: includes/cli.php:188
214
+ msgid "Enabled Avatar on your entire site. "
215
+ msgstr ""
216
+
217
  #: views/partials/_delete.php:15 views/partials/_delete.php:19
218
  #: views/partials/_disable.php:19 views/partials/_disable.php:28
219
  #: views/partials/_disable.php:33 views/partials/_disable.php:64
readme.txt CHANGED
@@ -1,407 +1,411 @@
1
- === Disable Comments - Remove Comments & Stop Spam [Multi-Site Support] ===
2
- Contributors: Asif2BD, priyomukul, wpdevteam, re_enter_rupok, tusharimran, alimuzzamanalim, solarissmoke, garrett-eclipse
3
- Donate link: https://wpdeveloper.com/
4
- Tags: comments, delete comments, disable comments, spam comment, disable, stop spam, remove comments, anti spam, disable xml-rpc, hide comment, XML-RPC, REST-API, WP-CLI, multi-site support
5
- Requires at least: 5.0
6
- Tested up to: 5.9
7
- Requires PHP: 5.6
8
- Stable tag: 2.3.4
9
- License: GPL-3.0-or-later
10
- License URI: https://www.gnu.org/licenses/gpl-3.0.html
11
-
12
- Allows administrators to globally disable comments on their site. Comments can be disabled according to post type. Multisite friendly. Provides tool to delete comments according to post type.
13
-
14
- == Description ==
15
-
16
- = Disable Comments - Remove Comments & Stop Spam [Multi-Site Support] =
17
-
18
- Instantly allow or disallow comments from any post type in WordPress (Pages, Posts, or Media) to stop the spammers and gain complete control over your full website. WP-CLI Support & Control comments via XML-RPC and REST-API too!
19
-
20
- [More About Plugin](https://wpdeveloper.com/plugins/disable-comments/) ◼️ [Documentation](https://wpdeveloper.com/docs-category/disable-comments/) ◼️ [Support Forum](https://wordpress.org/support/plugin/disable-comments/)
21
-
22
- https://www.youtube.com/watch?v=EpuYs9Nf_nY
23
-
24
- ## Take Global Control Over Your WordPress Site
25
- Override all comments-related settings throughout your website & manage your comments just the way you want.
26
-
27
- ## Disable Comments On Posts, Pages & Media
28
- Choose which posts, pages or media should allow comments from site visitors & configure Disable Comments accordingly
29
-
30
- ## Disallow Comments On Multi-Site Network
31
- Have multiple websites? Get rid of irrelevant comments on the entire network using Disable Comments Plugin
32
-
33
- https://www.youtube.com/watch?v=J9AteKzQpPs
34
-
35
- ## KEY FEATURES OF DISABLE COMMENTS
36
-
37
- * All “Comments” links are hidden from the Admin Menu and Admin Bar.
38
- * All comment-related sections (“Recent Comments”, “Discussion” etc.) are hidden from the WordPress Dashboard.
39
- * All comment-related widgets are disabled (so your theme cannot use them).
40
- * The “Discussion” settings page is hidden.
41
- * All comment RSS/Atom feeds are disabled (and requests for these will be redirected to the parent post).
42
- * The X-Pingback HTTP header is removed from all pages.
43
- * Outgoing pingbacks are disabled.
44
- * Stop spam comments entirely from the site with one click.
45
- * **[New]** Delete comments by type.
46
- * **[New]** Disable comments via [XML-RPC](https://wpdeveloper.com/docs/how-to-disable-comments-made-via-xml-rpc/) & [REST-API](https://wpdeveloper.com/docs/how-to-disable-comments-made-via-rest-api/)
47
- * **[New]** Fully Multi-site Network supported.
48
-
49
- https://www.youtube.com/watch?v=FBq3-W-p-DM
50
-
51
- Please delete any existing comments on your site **before applying this setting**, otherwise (depending on your theme) those comments may still be displayed to visitors. You can use the **Delete Comments tool** to delete any existing comments on your site.
52
-
53
- ## 🌟 WHAT’S NEW WITH DISABLE COMMENTS 2.0
54
-
55
- **AMAZING USER FRIENDLY INTERFACE**
56
- Easily configure your comment-related settings with an amazing and attractive app-like user interface.
57
-
58
- **WP-CLI COMMANDS TO DISABLE COMMENTS**
59
- Use [WP-CLI](https://wpdeveloper.com/docs/how-to-use-disable-comments-plugin-with-wp-cli-command-line/) control for comment-related settings to disable comments on posts, pages, attachments or everywhere on your website.
60
-
61
- https://www.youtube.com/watch?v=mzi5uhKB9Zk
62
-
63
- **GET STARTED WITH QUICK SETUP WIZARD**
64
- Use the quick setup wizard after activating the plugin to instantly configure comment-related settings for your WordPress website.
65
-
66
- **DISABLE COMMENTS ON DOCS**
67
- Instantly disable comments on your documentation pages or WordPress knowledge base with a single click.
68
-
69
- https://www.youtube.com/watch?v=t7BQ-7A4y4s
70
-
71
- **DELETE CERTAIN COMMENT TYPE(S)**
72
- Permanently delete certain comment types from your WordPress website including WooCommerce product reviews as well as generic comments.
73
-
74
- https://www.youtube.com/watch?v=Izm_ihC-z10
75
-
76
- **DISABLE COMMENTS VIA XML-RPC And REST API**
77
- Block any comments made on your WordPress website via XML-RPC specification and REST API.
78
-
79
- **Important note**: Use this plugin if you don't want comments at all on your site (or on certain post types). Don't use it if you want to selectively disable comments on individual posts - WordPress lets you do that anyway. If you don't know how to disable comments on individual posts, there are instructions in **[the FAQ](https://wordpress.org/plugins/disable-comments/#faq).**
80
-
81
- If you come across any bugs or have suggestions, please use the plugin support forum. I can't fix it if I don't know it's broken! Please check the **[FAQ](https://wordpress.org/plugins/disable-comments/#faq)** for common issues.
82
-
83
- Want to contribute? Here's the **[GitHub development repository](https://github.com/WPDevelopers/disable-comments)**.
84
-
85
- A [must-use version](https://github.com/WPDevelopers/disable-comments-mu) of the plugin is also available.
86
-
87
- ### Advanced Configuration
88
-
89
- Some of the plugin’s behavior can be modified by site administrators and plugin/theme developers through code:
90
-
91
- * Define `DISABLE_COMMENTS_REMOVE_COMMENTS_TEMPLATE` and set it to `false` to prevent the plugin from replacing the theme's comment template with an empty one.
92
-
93
- * Define `DISABLE_COMMENTS_ALLOW_DISCUSSION_SETTINGS` and set it to `true` to prevent the plugin from hiding the Discussion settings page.
94
-
95
- These definitions can be made either in your main `wp-config.php` or in your theme's `functions.php` file.
96
-
97
-
98
- **THIS PLUGIN IS NOW MAINTAINED BY THE TEAM** [WPDeveloper](https://wpdeveloper.com/).
99
-
100
-
101
- ### 💙 LOVED DISABLE COMMENTS?
102
-
103
- - For documentation and tutorials go to our [Documentation](https://wpdeveloper.com/docs-category/disable-comments/)
104
-
105
- - For video tutorials go to our [YouTube Playlist](https://www.youtube.com/watch?v=J9AteKzQpPs&list=PLWHp1xKHCfxD2_xOIR5dMAGf3wd4hv-8K)
106
-
107
- - Join our [Facebook Group](https://www.facebook.com/groups/wpdeveloper.net/)
108
-
109
- - If you love Disable Comments, [rate us on WordPress](https://wordpress.org/support/plugin/disable-comments/reviews/?filter=5)
110
-
111
- - For more information about features, FAQs, and documentation, check out our website at [Disable Comments](https://wpdeveloper.com/plugins/disable-comments/)
112
-
113
-
114
- ### 🔥 GET FREEBIES FOR YOUR WORDPRESS SITE
115
-
116
- Consider checking out our other WordPress solutions & boost your WordPress website:
117
-
118
- 🔝 [Essential Addons For Elementor](https://wordpress.org/plugins/essential-addons-for-elementor-lite/): Most popular Elementor addons with 70+ widgets & ready blocks
119
-
120
- 🔔 [NotificationX](https://notificationx.com/) – Best Social Proof & FOMO Marketing Solution to increase conversion rates.
121
-
122
- 🔗 [BetterLinks](https://wordpress.org/plugins/betterlinks/): Latest best WordPress link management plugin for link shortening, tracking & analyzing.
123
-
124
- 📄 [EmbedPress](https://wordpress.org/plugins/embedpress/): EmbedPress lets you embed anything including videos, images, posts, audio, maps and upload PDF, DOC, PPT etc.
125
-
126
- ☁ [Templately](https://wordpress.org/plugins/templately/): 1200+ Free templates library for Elementor & Gutenberg along with the cloud collaboration for WordPress.
127
-
128
- 📚 [BetterDocs](https://wordpress.org/plugins/betterdocs/): Best Documentation & Knowledge Base Plugin for WordPress reduce manual support tickets & improve user experience.
129
-
130
- ⏰ [SchedulePress](https://wordpress.org/plugins/wp-scheduled-posts/): Advanced editorial calendar with WordPress Post Scheduling, Social Sharing, Missed scheduled alerts, and more.
131
-
132
- ⭐ [ReviewX](https://wordpress.org/plugins/reviewx/): WooCommerce Product review plugin that allows users to submit product reviews with multiple criteria, photos, video, and more.
133
-
134
- ⚡ [Flexia](https://wordpress.org/themes/flexia/): Most lightweight, customizable & multi purpose theme for WordPress.
135
-
136
-
137
- Visit [WPDeveloper](https://wpdeveloper.com/) to learn more about how to do better in WordPress with [Help Tutorial, Tips & Tricks](https://wpdeveloper.com/blog).
138
-
139
-
140
-
141
- == Installation ==
142
-
143
- = Modern Way: =
144
- 1. Go to the WordPress Dashboard "Add New Plugin" section.
145
- 2. Search For "Disable Comments".
146
- 3. Install, then Activate it.
147
- 4. The plugin settings can be accessed via the 'Settings' menu in the administration area (either your site administration for single-site installs, or your network administration for network installs).
148
-
149
- = Old Way: =
150
- 1. Upload the plugin folder to the `/wp-content/plugins/` directory
151
- 2. Activate the plugin through the 'Plugins' menu in WordPress
152
- 3. The plugin settings can be accessed via the 'Settings' menu in the administration area (either your site administration for single-site installs, or your network administration for network installs).
153
-
154
-
155
-
156
- == Frequently Asked Questions ==
157
-
158
- = Nothing happens after I disable comments on all posts - comment forms still appear when I view my posts. =
159
-
160
- This is because your theme is not checking the comment status of posts in the correct way.
161
-
162
- You may like to point your theme's author to [this explanation](https://wpdeveloper.com/wordpress-posts-have-comments-allowed/) of what they are doing wrong, and how to fix it.
163
-
164
- = How can I remove the text that says "comments are closed" at the bottom of articles where comments are disabled? =
165
-
166
- The plugin tries its very best to hide this (and any other comment-related) messages.
167
-
168
- If you still see the message, then it means your theme is overriding this behaviour, and you will have to edit its files manually to remove it. Two common approaches are to either delete or comment out the relevant lines in `wp-content/your-theme/comments.php`, or to add a declaration to `wp-content/your-theme/style.css` that hides the message from your visitors. In either case, make you you know what you are doing!
169
-
170
- = I only want to disable comments on certain posts, not globally. What do I do? =
171
-
172
- Go to the edit page for the post you want to disable comments on. Scroll down to the "Discussion" box, where you will find the comment options for that post. If you don't see a "Discussion" box, then click on "Screen Options" at the top of your screen, and make sure the "Discussion" checkbox is checked.
173
-
174
- You can also bulk-edit the comment status of multiple posts from the [posts screen](https://codex.wordpress.org/Posts_Screen).
175
-
176
- = I want to delete comments from my database. What do I do? =
177
-
178
- Go to the tools page for the Disable Comments plugin and utlize the Delete Comments tool to delete all comments or according to the specified post types from your database.
179
-
180
-
181
-
182
- == Screenshots ==
183
-
184
- 1. Setting Screen for Disable Comments
185
- 2. Delete Comments under Tools menu.
186
- 3. Multisite Network support
187
-
188
-
189
- == Changelog ==
190
-
191
- The format is based on [Keep a Changelog](http://keepachangelog.com/)
192
- and this project adheres to [Semantic Versioning](http://semver.org/).
193
- This will be maiintained from August 19, 2020 - @asif2bd
194
-
195
- = [2.3.4] - 2022-03-28 =
196
- * Fixed: PHP Warning in Multisite Network.
197
-
198
- = [2.3.3] - 2022-01-25 =
199
- * Added: WordPress 5.9 compatibility added.
200
-
201
- = [2.3.2] - 2021-12-20 =
202
- * Added: Configure Disable Avatar settings from the main network of Multisite Network.
203
- * Fixed: Disable Comments via REST API toggle mismatch issue.
204
-
205
- = [2.3.1] - 2021-12-14 =
206
- * Added: You can enable or disable Avatar from Disable Comments settings.
207
-
208
- = [2.3.0] - 2021-12-14 =
209
- * New Feature: Delete Spam Comments.
210
- * Updated deprecated jQuery library.
211
- * Improvement: Disable Gravatar request.
212
- * Few minor bug fixes and improvement.
213
-
214
- = [2.2.4] - 2021-11-09 =
215
- * Added: Ajax pagination in Subsite area (Multisite network).
216
- * Added: Ajax search in Subsite area (Multisite network).
217
- * Added: "Disable Comments" navigation added inside Comments menu.
218
- * Few minor bug fixes and improvement.
219
-
220
- = [2.2.3] - 2021-10-25 =
221
- * Few minor bug fixes and improvement.
222
-
223
- = [2.2.2] - 2021-10-05 =
224
- * Added: "Select All" checkbox for subsites selection in a multisite network.
225
- * Few minor bug fixes and improvement.
226
-
227
- = [2.2.1] - 2021-09-26 =
228
- * Fixed: 100+ subsites limit issue in multisite network
229
-
230
- = [2.2.0] - 2021-09-22 =
231
- * New Feature: Configure Disable Comments on Subsites from Main Network in Multisite Network.
232
- * Improvement: UX Improvement.
233
- * Few minor bug fix and improvement.
234
-
235
- = [2.1.2] - 2021-06-20 =
236
- * Improvement: Fix for Attempt to read property "post_type" on null
237
-
238
- = [2.1.1] - 2021-04-06 =
239
- * Improvement: Compatible with WordPress 5.7
240
- * Few minor bug fix and improvement
241
-
242
-
243
- = [2.1.0] - 2021-02-08 =
244
- * New Feature: Site wise settings in Multisite Network
245
- * Added: Some strings localization
246
- * Fixed: Delete Comments in Multisite
247
- * Few minor bug fix and improvement
248
-
249
- = [2.0.2] - 2020-12-01 =
250
- * Removed: Quick Setup Wizard
251
- * Improved: Redirection settings page after activation.
252
- * Fixed: Text-Domain Issue.
253
-
254
- = [2.0.1] - 2020-11-28 =
255
- * Bug Fix: Settings page URL issue fixed from plugins page.
256
- * Improvement: Quick Setup Wizard instructions.
257
-
258
- = [2.0.0] - 2020-11-28 =
259
- * Improved UI for Settings page
260
- * New feature: Manage Disable Comments settings with WP-CLI
261
- * New feature: Quick Setup Wizard
262
- * New feature: Disable Comments via REST-API
263
- * New feature: Disable Comments via XML-RPC
264
-
265
- = [1.11.0] - 2020-08-22 =
266
- * Introducing Delete Comment by Type - Contribution by garretthyder
267
- * PHP 7.4 Tested
268
- * WordPress 5.5 Compatible Tested
269
-
270
- = [1.10.3] - 2020-07-29 =
271
- * Minor fix - changelog backported.
272
-
273
- = 1.10.0 =
274
- * Disable "recent comments" Gutenberg block.
275
-
276
- = 1.9.0 =
277
- * Fix compatibility with WordPress 5.0 and above.
278
- * Remove deprecated "persistent mode" feature.
279
-
280
- = 1.8.0 =
281
- * Added `DISABLE_COMMENTS_ALLOW_DISCUSSION_SETTINGS` configuration.
282
-
283
- = 1.7.1 =
284
- * Small enhancements to hiding comment-related functionality in the admin.
285
-
286
- = 1.7 =
287
- * Dropped logic to try and hide the comments link from the Meta widget. Administrators should manually add styling to hide this link, or replace the Meta widget with an alternative.
288
- * Removed the `disable_comments_allow_persistent_mode` filter. Define `DISABLE_COMMENTS_ALLOW_PERSISTENT_MODE` instead.
289
-
290
- = 1.6 =
291
- * Added a tool for deleting comments in bulk.
292
-
293
- = 1.5.2 =
294
- * Fix Javascript errors when the Meta widget is enabled.
295
- * Hide comments link from the Welcome panel.
296
-
297
- = 1.5.1 =
298
- * Hide existing comments if there are any.
299
- * Filter the comments link in the Meta widget if it is enabled.
300
-
301
- = 1.5 =
302
- * Remove the comments feed link from the head in WP 4.4 and higher.
303
-
304
- = 1.4.2 =
305
- * Delay loading of translation text domain until all plugins are loaded. This allows plugins to modify translations.
306
-
307
- = 1.4 =
308
- * Hide the troublesome "persistent mode" option for all sites where it is not in use. This option will be removed in a future release.
309
-
310
- = 1.3.2 =
311
- * Compatibility updates and code refactoring for WordPress 4.3
312
- * Adding a few new translations
313
-
314
- = 1.3.1 =
315
- * Change the behaviour for comment feed requests. This removes a potential security issue.
316
-
317
- = 1.3 =
318
- * Move persistent mode filter into a define.
319
- * Add an advanced option to show the theme's comment template even when comments are disabled.
320
-
321
- = 1.2 =
322
- * Allow network administrators to disable comments on custom post types across the whole network.
323
-
324
- = 1.1.1 =
325
- * Fix PHP warning when active_sitewide_plugins option doesn't contain expected data type.
326
-
327
- = 1.1 =
328
- * Attempt to hide the comments template ("Comments are closed") whenever comments are disabled.
329
-
330
- = 1.0.4 =
331
- * Fix CSRF vulnerability in the admin. Thanks to dxw for responsible disclosure.
332
-
333
- = 1.0.3 =
334
- * Compatibility fix for WordPress 3.8
335
-
336
- = 1.0.2 =
337
- * Disable comment-reply script for themes that don't check comment status properly.
338
- * Add French translation
339
-
340
- = 1.0.1 =
341
- * Fix issue with settings persistence in single-site installations.
342
-
343
- = 1.0 =
344
- * Prevent theme comments template from being displayed when comments are disabled everywhere.
345
- * Prevent direct access to comment admin pages when comments are disabled everywhere.
346
-
347
- = 0.9.2 =
348
- * Make persistent mode option filter available all the time.
349
- * Fix redirection for feed requests
350
- * Fix admin bar filtering in WP 3.6
351
-
352
- = 0.9.1 =
353
- * Short life in the wild.
354
-
355
- = 0.9 =
356
- * Added gettext support and German translation.
357
- * Added links to GitHub development repo.
358
- * Allow network administrators to prevent the use of persistent mode.
359
-
360
- = 0.8 =
361
- * Remove X-Pingback header when comments are completely disabled.
362
- * Disable comment feeds when comment are completely disabled.
363
- * Simplified settings page.
364
-
365
- = 0.7 =
366
- * Now supports Network Activation - disable comments on your entire multi-site network.
367
- * Simplified settings page.
368
-
369
- = 0.6 =
370
- * Add "persistent mode" to deal with themes that don't use filterable comment status checking.
371
-
372
- = 0.5 =
373
- * Allow temporary disabling of comments site-wide by ensuring that original comment statuses are not overwritten when a post is edited.
374
-
375
- = 0.4 =
376
- * Added the option to disable the Recent Comments template widget.
377
- * Bugfix: don't show admin messages to users who don't can't do anything about them.
378
-
379
- = 0.3.5 =
380
- * Bugfix: Other admin menu items could inadvertently be hidden when 'Remove the "Comments" link from the Admin Menu' was selected.
381
-
382
- = 0.3.4 =
383
- * Bugfix: A typo on the settings page meant that the submit button went missing on some browsers. Thanks to Wojtek for reporting this.
384
-
385
- = 0.3.3 =
386
- * Bugfix: Custom post types which don't support comments shouldn't appear on the settings page
387
- * Add warning notice to Discussion settings when comments are disabled
388
-
389
- = 0.3.2 =
390
- * Bugfix: Some dashboard items were incorrectly hidden in multisite
391
-
392
- = 0.3.1 =
393
- * Compatibility fix for WordPress 3.3
394
-
395
- = 0.3 =
396
- * Added the ability to remove links to comment admin pages from the Dashboard, Admin Bar and Admin Menu
397
-
398
- = 0.2.1 =
399
- * Usability improvements to help first-time users configure the plugin.
400
-
401
- = 0.2 =
402
- * Bugfix: Make sure pingbacks are also prevented when comments are disabled.
403
-
404
-
405
- == Upgrade Notice ==
406
-
407
- [Minor Update] Few minor bug fixes and improvement.
 
 
 
 
1
+ === Disable Comments - Remove Comments & Stop Spam [Multi-Site Support] ===
2
+ Contributors: Asif2BD, priyomukul, wpdevteam, re_enter_rupok, tusharimran, alimuzzamanalim, solarissmoke, garrett-eclipse
3
+ Donate link: https://wpdeveloper.com/
4
+ Tags: comments, delete comments, disable comments, spam comment, disable, stop spam, remove comments, anti spam, disable xml-rpc, hide comment, XML-RPC, REST-API, WP-CLI, multi-site support
5
+ Requires at least: 5.0
6
+ Tested up to: 6.0
7
+ Requires PHP: 5.6
8
+ Stable tag: 2.3.5
9
+ License: GPL-3.0-or-later
10
+ License URI: https://www.gnu.org/licenses/gpl-3.0.html
11
+
12
+ Allows administrators to globally disable comments on their site. Comments can be disabled according to post type. Multisite friendly. Provides tool to delete comments according to post type.
13
+
14
+ == Description ==
15
+
16
+ = Disable Comments - Remove Comments & Stop Spam [Multi-Site Support] =
17
+
18
+ Instantly allow or disallow comments from any post type in WordPress (Pages, Posts, or Media) to stop the spammers and gain complete control over your full website. WP-CLI Support & Control comments via XML-RPC and REST-API too!
19
+
20
+ [More About Plugin](https://wpdeveloper.com/plugins/disable-comments/) ◼️ [Documentation](https://wpdeveloper.com/docs-category/disable-comments/) ◼️ [Support Forum](https://wordpress.org/support/plugin/disable-comments/)
21
+
22
+ https://www.youtube.com/watch?v=EpuYs9Nf_nY
23
+
24
+ ## Take Global Control Over Your WordPress Site
25
+ Override all comments-related settings throughout your website & manage your comments just the way you want.
26
+
27
+ ## Disable Comments On Posts, Pages & Media
28
+ Choose which posts, pages or media should allow comments from site visitors & configure Disable Comments accordingly
29
+
30
+ ## Disallow Comments On Multi-Site Network
31
+ Have multiple websites? Get rid of irrelevant comments on the entire network using Disable Comments Plugin
32
+
33
+ https://www.youtube.com/watch?v=J9AteKzQpPs
34
+
35
+ ## KEY FEATURES OF DISABLE COMMENTS
36
+
37
+ * All “Comments” links are hidden from the Admin Menu and Admin Bar.
38
+ * All comment-related sections (“Recent Comments”, “Discussion” etc.) are hidden from the WordPress Dashboard.
39
+ * All comment-related widgets are disabled (so your theme cannot use them).
40
+ * The “Discussion” settings page is hidden.
41
+ * All comment RSS/Atom feeds are disabled (and requests for these will be redirected to the parent post).
42
+ * The X-Pingback HTTP header is removed from all pages.
43
+ * Outgoing pingbacks are disabled.
44
+ * Stop spam comments entirely from the site with one click.
45
+ * **[New]** Delete comments by type.
46
+ * **[New]** Disable comments via [XML-RPC](https://wpdeveloper.com/docs/how-to-disable-comments-made-via-xml-rpc/) & [REST-API](https://wpdeveloper.com/docs/how-to-disable-comments-made-via-rest-api/)
47
+ * **[New]** Fully Multi-site Network supported.
48
+
49
+ https://www.youtube.com/watch?v=FBq3-W-p-DM
50
+
51
+ Please delete any existing comments on your site **before applying this setting**, otherwise (depending on your theme) those comments may still be displayed to visitors. You can use the **Delete Comments tool** to delete any existing comments on your site.
52
+
53
+ ## 🌟 WHAT’S NEW WITH DISABLE COMMENTS 2.0
54
+
55
+ **AMAZING USER FRIENDLY INTERFACE**
56
+ Easily configure your comment-related settings with an amazing and attractive app-like user interface.
57
+
58
+ **WP-CLI COMMANDS TO DISABLE COMMENTS**
59
+ Use [WP-CLI](https://wpdeveloper.com/docs/how-to-use-disable-comments-plugin-with-wp-cli-command-line/) control for comment-related settings to disable comments on posts, pages, attachments or everywhere on your website.
60
+
61
+ https://www.youtube.com/watch?v=mzi5uhKB9Zk
62
+
63
+ **GET STARTED WITH QUICK SETUP WIZARD**
64
+ Use the quick setup wizard after activating the plugin to instantly configure comment-related settings for your WordPress website.
65
+
66
+ **DISABLE COMMENTS ON DOCS**
67
+ Instantly disable comments on your documentation pages or WordPress knowledge base with a single click.
68
+
69
+ https://www.youtube.com/watch?v=t7BQ-7A4y4s
70
+
71
+ **DELETE CERTAIN COMMENT TYPE(S)**
72
+ Permanently delete certain comment types from your WordPress website including WooCommerce product reviews as well as generic comments.
73
+
74
+ https://www.youtube.com/watch?v=Izm_ihC-z10
75
+
76
+ **DISABLE COMMENTS VIA XML-RPC And REST API**
77
+ Block any comments made on your WordPress website via XML-RPC specification and REST API.
78
+
79
+ **Important note**: Use this plugin if you don't want comments at all on your site (or on certain post types). Don't use it if you want to selectively disable comments on individual posts - WordPress lets you do that anyway. If you don't know how to disable comments on individual posts, there are instructions in **[the FAQ](https://wordpress.org/plugins/disable-comments/#faq).**
80
+
81
+ If you come across any bugs or have suggestions, please use the plugin support forum. I can't fix it if I don't know it's broken! Please check the **[FAQ](https://wordpress.org/plugins/disable-comments/#faq)** for common issues.
82
+
83
+ Want to contribute? Here's the **[GitHub development repository](https://github.com/WPDevelopers/disable-comments)**.
84
+
85
+ A [must-use version](https://github.com/WPDevelopers/disable-comments-mu) of the plugin is also available.
86
+
87
+ ### Advanced Configuration
88
+
89
+ Some of the plugin’s behavior can be modified by site administrators and plugin/theme developers through code:
90
+
91
+ * Define `DISABLE_COMMENTS_REMOVE_COMMENTS_TEMPLATE` and set it to `false` to prevent the plugin from replacing the theme's comment template with an empty one.
92
+
93
+ * Define `DISABLE_COMMENTS_ALLOW_DISCUSSION_SETTINGS` and set it to `true` to prevent the plugin from hiding the Discussion settings page.
94
+
95
+ These definitions can be made either in your main `wp-config.php` or in your theme's `functions.php` file.
96
+
97
+
98
+ **THIS PLUGIN IS NOW MAINTAINED BY THE TEAM** [WPDeveloper](https://wpdeveloper.com/).
99
+
100
+
101
+ ### 💙 LOVED DISABLE COMMENTS?
102
+
103
+ - For documentation and tutorials go to our [Documentation](https://wpdeveloper.com/docs-category/disable-comments/)
104
+
105
+ - For video tutorials go to our [YouTube Playlist](https://www.youtube.com/watch?v=J9AteKzQpPs&list=PLWHp1xKHCfxD2_xOIR5dMAGf3wd4hv-8K)
106
+
107
+ - Join our [Facebook Group](https://www.facebook.com/groups/wpdeveloper.net/)
108
+
109
+ - If you love Disable Comments, [rate us on WordPress](https://wordpress.org/support/plugin/disable-comments/reviews/?filter=5)
110
+
111
+ - For more information about features, FAQs, and documentation, check out our website at [Disable Comments](https://wpdeveloper.com/plugins/disable-comments/)
112
+
113
+
114
+ ### 🔥 GET FREEBIES FOR YOUR WORDPRESS SITE
115
+
116
+ Consider checking out our other WordPress solutions & boost your WordPress website:
117
+
118
+ 🔝 [Essential Addons For Elementor](https://wordpress.org/plugins/essential-addons-for-elementor-lite/): Most popular Elementor addons with 70+ widgets & ready blocks
119
+
120
+ 🔔 [NotificationX](https://notificationx.com/) – Best Social Proof & FOMO Marketing Solution to increase conversion rates.
121
+
122
+ 🔗 [BetterLinks](https://wordpress.org/plugins/betterlinks/): Latest best WordPress link management plugin for link shortening, tracking & analyzing.
123
+
124
+ 📄 [EmbedPress](https://wordpress.org/plugins/embedpress/): EmbedPress lets you embed anything including videos, images, posts, audio, maps and upload PDF, DOC, PPT etc.
125
+
126
+ ☁ [Templately](https://wordpress.org/plugins/templately/): 1200+ Free templates library for Elementor & Gutenberg along with the cloud collaboration for WordPress.
127
+
128
+ 📚 [BetterDocs](https://wordpress.org/plugins/betterdocs/): Best Documentation & Knowledge Base Plugin for WordPress reduce manual support tickets & improve user experience.
129
+
130
+ ⏰ [SchedulePress](https://wordpress.org/plugins/wp-scheduled-posts/): Advanced editorial calendar with WordPress Post Scheduling, Social Sharing, Missed scheduled alerts, and more.
131
+
132
+ ⭐ [ReviewX](https://wordpress.org/plugins/reviewx/): WooCommerce Product review plugin that allows users to submit product reviews with multiple criteria, photos, video, and more.
133
+
134
+ ⚡ [Flexia](https://wordpress.org/themes/flexia/): Most lightweight, customizable & multi purpose theme for WordPress.
135
+
136
+
137
+ Visit [WPDeveloper](https://wpdeveloper.com/) to learn more about how to do better in WordPress with [Help Tutorial, Tips & Tricks](https://wpdeveloper.com/blog).
138
+
139
+
140
+
141
+ == Installation ==
142
+
143
+ = Modern Way: =
144
+ 1. Go to the WordPress Dashboard "Add New Plugin" section.
145
+ 2. Search For "Disable Comments".
146
+ 3. Install, then Activate it.
147
+ 4. The plugin settings can be accessed via the 'Settings' menu in the administration area (either your site administration for single-site installs, or your network administration for network installs).
148
+
149
+ = Old Way: =
150
+ 1. Upload the plugin folder to the `/wp-content/plugins/` directory
151
+ 2. Activate the plugin through the 'Plugins' menu in WordPress
152
+ 3. The plugin settings can be accessed via the 'Settings' menu in the administration area (either your site administration for single-site installs, or your network administration for network installs).
153
+
154
+
155
+
156
+ == Frequently Asked Questions ==
157
+
158
+ = Nothing happens after I disable comments on all posts - comment forms still appear when I view my posts. =
159
+
160
+ This is because your theme is not checking the comment status of posts in the correct way.
161
+
162
+ You may like to point your theme's author to [this explanation](https://wpdeveloper.com/wordpress-posts-have-comments-allowed/) of what they are doing wrong, and how to fix it.
163
+
164
+ = How can I remove the text that says "comments are closed" at the bottom of articles where comments are disabled? =
165
+
166
+ The plugin tries its very best to hide this (and any other comment-related) messages.
167
+
168
+ If you still see the message, then it means your theme is overriding this behaviour, and you will have to edit its files manually to remove it. Two common approaches are to either delete or comment out the relevant lines in `wp-content/your-theme/comments.php`, or to add a declaration to `wp-content/your-theme/style.css` that hides the message from your visitors. In either case, make you you know what you are doing!
169
+
170
+ = I only want to disable comments on certain posts, not globally. What do I do? =
171
+
172
+ Go to the edit page for the post you want to disable comments on. Scroll down to the "Discussion" box, where you will find the comment options for that post. If you don't see a "Discussion" box, then click on "Screen Options" at the top of your screen, and make sure the "Discussion" checkbox is checked.
173
+
174
+ You can also bulk-edit the comment status of multiple posts from the [posts screen](https://codex.wordpress.org/Posts_Screen).
175
+
176
+ = I want to delete comments from my database. What do I do? =
177
+
178
+ Go to the tools page for the Disable Comments plugin and utlize the Delete Comments tool to delete all comments or according to the specified post types from your database.
179
+
180
+
181
+
182
+ == Screenshots ==
183
+
184
+ 1. Setting Screen for Disable Comments
185
+ 2. Delete Comments under Tools menu.
186
+ 3. Multisite Network support
187
+
188
+
189
+ == Changelog ==
190
+
191
+ The format is based on [Keep a Changelog](http://keepachangelog.com/)
192
+ and this project adheres to [Semantic Versioning](http://semver.org/).
193
+ This will be maiintained from August 19, 2020 - @asif2bd
194
+
195
+ = [2.3.5] - 2022-04-27 =
196
+ * Added: More WP-CLI commands.
197
+ * Few minor bug fix and improvement.
198
+
199
+ = [2.3.4] - 2022-03-28 =
200
+ * Fixed: PHP Warning in Multisite Network.
201
+
202
+ = [2.3.3] - 2022-01-25 =
203
+ * Added: WordPress 5.9 compatibility added.
204
+
205
+ = [2.3.2] - 2021-12-20 =
206
+ * Added: Configure Disable Avatar settings from the main network of Multisite Network.
207
+ * Fixed: Disable Comments via REST API toggle mismatch issue.
208
+
209
+ = [2.3.1] - 2021-12-14 =
210
+ * Added: You can enable or disable Avatar from Disable Comments settings.
211
+
212
+ = [2.3.0] - 2021-12-14 =
213
+ * New Feature: Delete Spam Comments.
214
+ * Updated deprecated jQuery library.
215
+ * Improvement: Disable Gravatar request.
216
+ * Few minor bug fixes and improvement.
217
+
218
+ = [2.2.4] - 2021-11-09 =
219
+ * Added: Ajax pagination in Subsite area (Multisite network).
220
+ * Added: Ajax search in Subsite area (Multisite network).
221
+ * Added: "Disable Comments" navigation added inside Comments menu.
222
+ * Few minor bug fixes and improvement.
223
+
224
+ = [2.2.3] - 2021-10-25 =
225
+ * Few minor bug fixes and improvement.
226
+
227
+ = [2.2.2] - 2021-10-05 =
228
+ * Added: "Select All" checkbox for subsites selection in a multisite network.
229
+ * Few minor bug fixes and improvement.
230
+
231
+ = [2.2.1] - 2021-09-26 =
232
+ * Fixed: 100+ subsites limit issue in multisite network
233
+
234
+ = [2.2.0] - 2021-09-22 =
235
+ * New Feature: Configure Disable Comments on Subsites from Main Network in Multisite Network.
236
+ * Improvement: UX Improvement.
237
+ * Few minor bug fix and improvement.
238
+
239
+ = [2.1.2] - 2021-06-20 =
240
+ * Improvement: Fix for Attempt to read property "post_type" on null
241
+
242
+ = [2.1.1] - 2021-04-06 =
243
+ * Improvement: Compatible with WordPress 5.7
244
+ * Few minor bug fix and improvement
245
+
246
+
247
+ = [2.1.0] - 2021-02-08 =
248
+ * New Feature: Site wise settings in Multisite Network
249
+ * Added: Some strings localization
250
+ * Fixed: Delete Comments in Multisite
251
+ * Few minor bug fix and improvement
252
+
253
+ = [2.0.2] - 2020-12-01 =
254
+ * Removed: Quick Setup Wizard
255
+ * Improved: Redirection settings page after activation.
256
+ * Fixed: Text-Domain Issue.
257
+
258
+ = [2.0.1] - 2020-11-28 =
259
+ * Bug Fix: Settings page URL issue fixed from plugins page.
260
+ * Improvement: Quick Setup Wizard instructions.
261
+
262
+ = [2.0.0] - 2020-11-28 =
263
+ * Improved UI for Settings page
264
+ * New feature: Manage Disable Comments settings with WP-CLI
265
+ * New feature: Quick Setup Wizard
266
+ * New feature: Disable Comments via REST-API
267
+ * New feature: Disable Comments via XML-RPC
268
+
269
+ = [1.11.0] - 2020-08-22 =
270
+ * Introducing Delete Comment by Type - Contribution by garretthyder
271
+ * PHP 7.4 Tested
272
+ * WordPress 5.5 Compatible Tested
273
+
274
+ = [1.10.3] - 2020-07-29 =
275
+ * Minor fix - changelog backported.
276
+
277
+ = 1.10.0 =
278
+ * Disable "recent comments" Gutenberg block.
279
+
280
+ = 1.9.0 =
281
+ * Fix compatibility with WordPress 5.0 and above.
282
+ * Remove deprecated "persistent mode" feature.
283
+
284
+ = 1.8.0 =
285
+ * Added `DISABLE_COMMENTS_ALLOW_DISCUSSION_SETTINGS` configuration.
286
+
287
+ = 1.7.1 =
288
+ * Small enhancements to hiding comment-related functionality in the admin.
289
+
290
+ = 1.7 =
291
+ * Dropped logic to try and hide the comments link from the Meta widget. Administrators should manually add styling to hide this link, or replace the Meta widget with an alternative.
292
+ * Removed the `disable_comments_allow_persistent_mode` filter. Define `DISABLE_COMMENTS_ALLOW_PERSISTENT_MODE` instead.
293
+
294
+ = 1.6 =
295
+ * Added a tool for deleting comments in bulk.
296
+
297
+ = 1.5.2 =
298
+ * Fix Javascript errors when the Meta widget is enabled.
299
+ * Hide comments link from the Welcome panel.
300
+
301
+ = 1.5.1 =
302
+ * Hide existing comments if there are any.
303
+ * Filter the comments link in the Meta widget if it is enabled.
304
+
305
+ = 1.5 =
306
+ * Remove the comments feed link from the head in WP 4.4 and higher.
307
+
308
+ = 1.4.2 =
309
+ * Delay loading of translation text domain until all plugins are loaded. This allows plugins to modify translations.
310
+
311
+ = 1.4 =
312
+ * Hide the troublesome "persistent mode" option for all sites where it is not in use. This option will be removed in a future release.
313
+
314
+ = 1.3.2 =
315
+ * Compatibility updates and code refactoring for WordPress 4.3
316
+ * Adding a few new translations
317
+
318
+ = 1.3.1 =
319
+ * Change the behaviour for comment feed requests. This removes a potential security issue.
320
+
321
+ = 1.3 =
322
+ * Move persistent mode filter into a define.
323
+ * Add an advanced option to show the theme's comment template even when comments are disabled.
324
+
325
+ = 1.2 =
326
+ * Allow network administrators to disable comments on custom post types across the whole network.
327
+
328
+ = 1.1.1 =
329
+ * Fix PHP warning when active_sitewide_plugins option doesn't contain expected data type.
330
+
331
+ = 1.1 =
332
+ * Attempt to hide the comments template ("Comments are closed") whenever comments are disabled.
333
+
334
+ = 1.0.4 =
335
+ * Fix CSRF vulnerability in the admin. Thanks to dxw for responsible disclosure.
336
+
337
+ = 1.0.3 =
338
+ * Compatibility fix for WordPress 3.8
339
+
340
+ = 1.0.2 =
341
+ * Disable comment-reply script for themes that don't check comment status properly.
342
+ * Add French translation
343
+
344
+ = 1.0.1 =
345
+ * Fix issue with settings persistence in single-site installations.
346
+
347
+ = 1.0 =
348
+ * Prevent theme comments template from being displayed when comments are disabled everywhere.
349
+ * Prevent direct access to comment admin pages when comments are disabled everywhere.
350
+
351
+ = 0.9.2 =
352
+ * Make persistent mode option filter available all the time.
353
+ * Fix redirection for feed requests
354
+ * Fix admin bar filtering in WP 3.6
355
+
356
+ = 0.9.1 =
357
+ * Short life in the wild.
358
+
359
+ = 0.9 =
360
+ * Added gettext support and German translation.
361
+ * Added links to GitHub development repo.
362
+ * Allow network administrators to prevent the use of persistent mode.
363
+
364
+ = 0.8 =
365
+ * Remove X-Pingback header when comments are completely disabled.
366
+ * Disable comment feeds when comment are completely disabled.
367
+ * Simplified settings page.
368
+
369
+ = 0.7 =
370
+ * Now supports Network Activation - disable comments on your entire multi-site network.
371
+ * Simplified settings page.
372
+
373
+ = 0.6 =
374
+ * Add "persistent mode" to deal with themes that don't use filterable comment status checking.
375
+
376
+ = 0.5 =
377
+ * Allow temporary disabling of comments site-wide by ensuring that original comment statuses are not overwritten when a post is edited.
378
+
379
+ = 0.4 =
380
+ * Added the option to disable the Recent Comments template widget.
381
+ * Bugfix: don't show admin messages to users who don't can't do anything about them.
382
+
383
+ = 0.3.5 =
384
+ * Bugfix: Other admin menu items could inadvertently be hidden when 'Remove the "Comments" link from the Admin Menu' was selected.
385
+
386
+ = 0.3.4 =
387
+ * Bugfix: A typo on the settings page meant that the submit button went missing on some browsers. Thanks to Wojtek for reporting this.
388
+
389
+ = 0.3.3 =
390
+ * Bugfix: Custom post types which don't support comments shouldn't appear on the settings page
391
+ * Add warning notice to Discussion settings when comments are disabled
392
+
393
+ = 0.3.2 =
394
+ * Bugfix: Some dashboard items were incorrectly hidden in multisite
395
+
396
+ = 0.3.1 =
397
+ * Compatibility fix for WordPress 3.3
398
+
399
+ = 0.3 =
400
+ * Added the ability to remove links to comment admin pages from the Dashboard, Admin Bar and Admin Menu
401
+
402
+ = 0.2.1 =
403
+ * Usability improvements to help first-time users configure the plugin.
404
+
405
+ = 0.2 =
406
+ * Bugfix: Make sure pingbacks are also prevented when comments are disabled.
407
+
408
+
409
+ == Upgrade Notice ==
410
+
411
+ [Minor Update] Few minor bug fixes and improvement.