Disable Comments - Version 2.3.2

Version Description

Download this release

Release Info

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

Code changes from version V2.3.1 to 2.3.2

assets/css/style.css CHANGED
@@ -3169,6 +3169,25 @@ button.button__instagram.hover__highlight:hover .icon {
3169
  margin-bottom: 15px;
3170
  }
3171
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3172
  .dc-item__card_wrap {
3173
  height: 100%;
3174
  display: -webkit-box;
3169
  margin-bottom: 15px;
3170
  }
3171
 
3172
+ .disable__switch {
3173
+ display: -webkit-box;
3174
+ display: -ms-flexbox;
3175
+ display: flex;
3176
+ -ms-flex-wrap: wrap;
3177
+ flex-wrap: wrap;
3178
+ }
3179
+
3180
+ .disable__switch .avatar__status {
3181
+ -webkit-box-flex: 0;
3182
+ -ms-flex: 0 0 170px;
3183
+ flex: 0 0 170px;
3184
+ }
3185
+
3186
+ .disable__switch .avatar__status label {
3187
+ color: #687b95 !important;
3188
+ display: inline-block !important;
3189
+ }
3190
+
3191
  .dc-item__card_wrap {
3192
  height: 100%;
3193
  display: -webkit-box;
disable-comments.php CHANGED
@@ -4,9 +4,9 @@
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.1
8
  * Author: WPDeveloper
9
- * Author URI: https://wpdeveloper.net
10
  * License: GPL-3.0+
11
  * License URI: https://www.gnu.org/licenses/gpl-3.0.html
12
  * Text Domain: disable-comments
@@ -37,7 +37,7 @@ class Disable_Comments
37
 
38
  function __construct()
39
  {
40
- define('DC_VERSION', '2.3.1');
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/');
@@ -819,9 +819,29 @@ class Disable_Comments
819
 
820
  public function settings_page()
821
  {
822
- if( isset( $_GET['cancel'] ) && trim( $_GET['cancel'] ) === 'setup' ){
823
- $this->update_option('dc_setup_screen_seen', true);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
824
  }
 
825
  include_once DC_PLUGIN_VIEWS_PATH . 'settings.php';
826
  }
827
 
@@ -918,7 +938,22 @@ class Disable_Comments
918
  }
919
 
920
  if(isset($formArray['disable_avatar'])){
921
- update_option('show_avatars', (bool) !$formArray['disable_avatar']);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
922
  }
923
  // xml rpc
924
  $this->options['remove_xmlrpc_comments'] = (isset($formArray['remove_xmlrpc_comments']) ? intval($formArray['remove_xmlrpc_comments']) : ($this->is_CLI && isset($this->options['remove_xmlrpc_comments']) ? $this->options['remove_xmlrpc_comments'] : 0));
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.2
8
  * Author: WPDeveloper
9
+ * Author URI: https://wpdeveloper.com
10
  * License: GPL-3.0+
11
  * License URI: https://www.gnu.org/licenses/gpl-3.0.html
12
  * Text Domain: disable-comments
37
 
38
  function __construct()
39
  {
40
+ define('DC_VERSION', '2.3.2');
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/');
819
 
820
  public function settings_page()
821
  {
822
+ // if( isset( $_GET['cancel'] ) && trim( $_GET['cancel'] ) === 'setup' ){
823
+ // $this->update_option('dc_setup_screen_seen', true);
824
+ // }
825
+ $avatar_status = '-1';
826
+ if($this->is_network_admin()){
827
+ $show_avatars = [];
828
+ $sites = get_sites([
829
+ 'number' => 0,
830
+ 'fields' => 'ids',
831
+ ]);
832
+ foreach ( $sites as $blog_id ) {
833
+ switch_to_blog( $blog_id );
834
+ $show_avatars[] = get_option('show_avatars', '0');
835
+ restore_current_blog();
836
+ }
837
+ if(count($show_avatars) == array_sum($show_avatars)){
838
+ $avatar_status = '0';
839
+ }
840
+ elseif(0 == array_sum($show_avatars)){
841
+ $avatar_status = '1';
842
+ }
843
  }
844
+
845
  include_once DC_PLUGIN_VIEWS_PATH . 'settings.php';
846
  }
847
 
938
  }
939
 
940
  if(isset($formArray['disable_avatar'])){
941
+ if($this->is_network_admin()){
942
+ if($formArray['disable_avatar'] == '0' || $formArray['disable_avatar'] == '1'){
943
+ $sites = get_sites([
944
+ 'number' => 0,
945
+ 'fields' => 'ids',
946
+ ]);
947
+ foreach ( $sites as $blog_id ) {
948
+ switch_to_blog( $blog_id );
949
+ update_option('show_avatars', (bool) !$formArray['disable_avatar']);
950
+ restore_current_blog();
951
+ }
952
+ }
953
+ }
954
+ else{
955
+ update_option('show_avatars', (bool) !$formArray['disable_avatar']);
956
+ }
957
  }
958
  // xml rpc
959
  $this->options['remove_xmlrpc_comments'] = (isset($formArray['remove_xmlrpc_comments']) ? intval($formArray['remove_xmlrpc_comments']) : ($this->is_CLI && isset($this->options['remove_xmlrpc_comments']) ? $this->options['remove_xmlrpc_comments'] : 0));
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.1\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/disable-comments\n"
7
- "POT-Creation-Date: 2021-12-14 10:57:48+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,20 +86,20 @@ msgstr ""
86
  msgid "Default (no type)"
87
  msgstr ""
88
 
89
- #: disable-comments.php:934
90
  msgid "Saved"
91
  msgstr ""
92
 
93
- #: disable-comments.php:1005 disable-comments.php:1039
94
- #: disable-comments.php:1062
95
  msgid "All comments have been deleted"
96
  msgstr ""
97
 
98
- #: disable-comments.php:1007 disable-comments.php:1011
99
  msgid "Internal error occured. Please try again later."
100
  msgstr ""
101
 
102
- #: disable-comments.php:1073
103
  msgid "All spam comments have been deleted"
104
  msgstr ""
105
 
@@ -201,7 +201,7 @@ msgstr ""
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
204
- #: views/partials/_disable.php:80
205
  msgid "Note:"
206
  msgstr ""
207
 
@@ -293,12 +293,12 @@ msgid ""
293
  msgstr ""
294
 
295
  #: views/partials/_disable.php:14 views/partials/_disable.php:74
296
- #: views/partials/_disable.php:93 views/partials/_disable.php:103
297
  msgid "On"
298
  msgstr ""
299
 
300
  #: views/partials/_disable.php:15 views/partials/_disable.php:75
301
- #: views/partials/_disable.php:94 views/partials/_disable.php:104
302
  msgid "Off"
303
  msgstr ""
304
 
@@ -309,7 +309,9 @@ msgid ""
309
  msgstr ""
310
 
311
  #: views/partials/_disable.php:28
312
- msgid "All the underneath settings will be applied for these selected sub sites."
 
 
313
  msgstr ""
314
 
315
  #: views/partials/_disable.php:33
@@ -340,39 +342,58 @@ msgid ""
340
  "posts. Comments will be visible on all other post types."
341
  msgstr ""
342
 
343
- #: views/partials/_disable.php:76
344
  msgid "Disable Avatar"
345
  msgstr ""
346
 
347
  #: views/partials/_disable.php:80
348
- msgid "This will remove Avatar from your entire website."
 
 
 
 
349
  msgstr ""
350
 
351
- #: views/partials/_disable.php:85
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
352
  msgid "Disable Comments With API"
353
  msgstr ""
354
 
355
- #: views/partials/_disable.php:86
356
  msgid ""
357
  "You can disable comments made on your website using WordPress "
358
  "specifications."
359
  msgstr ""
360
 
361
- #: views/partials/_disable.php:96
362
  msgid "Disable Comments via XML-RPC"
363
  msgstr ""
364
 
365
- #: views/partials/_disable.php:105
366
  msgid "Disable Comments via REST API"
367
  msgstr ""
368
 
369
- #: views/partials/_disable.php:109
370
  msgid ""
371
  "Turning on these settings will disable any comments made on your website "
372
  "via XML-RPC or REST API specifications."
373
  msgstr ""
374
 
375
- #: views/partials/_disable.php:114
376
  msgid "Save Changes"
377
  msgstr ""
378
 
@@ -452,7 +473,7 @@ msgid "WPDeveloper"
452
  msgstr ""
453
 
454
  #. Author URI of the plugin/theme
455
- msgid "https://wpdeveloper.net"
456
  msgstr ""
457
 
458
  #: disable-comments.php:716
2
  # This file is distributed under the GPL-3.0+.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: Disable Comments 2.3.2\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/disable-comments\n"
7
+ "POT-Creation-Date: 2021-12-20 07:54:04+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: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
 
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
204
+ #: views/partials/_disable.php:80 views/partials/_disable.php:105
205
  msgid "Note:"
206
  msgstr ""
207
 
293
  msgstr ""
294
 
295
  #: views/partials/_disable.php:14 views/partials/_disable.php:74
296
+ #: views/partials/_disable.php:119 views/partials/_disable.php:129
297
  msgid "On"
298
  msgstr ""
299
 
300
  #: views/partials/_disable.php:15 views/partials/_disable.php:75
301
+ #: views/partials/_disable.php:120 views/partials/_disable.php:130
302
  msgid "Off"
303
  msgstr ""
304
 
309
  msgstr ""
310
 
311
  #: views/partials/_disable.php:28
312
+ msgid ""
313
+ "All the underneath settings (except Avatar settings) will be applied for "
314
+ "these selected sub sites."
315
  msgstr ""
316
 
317
  #: views/partials/_disable.php:33
342
  "posts. Comments will be visible on all other post types."
343
  msgstr ""
344
 
345
+ #: views/partials/_disable.php:76 views/partials/_disable.php:101
346
  msgid "Disable Avatar"
347
  msgstr ""
348
 
349
  #: views/partials/_disable.php:80
350
+ msgid "This will change Avatar state from your entire site."
351
+ msgstr ""
352
+
353
+ #: views/partials/_disable.php:84
354
+ msgid "Avatar settings:"
355
  msgstr ""
356
 
357
+ #: views/partials/_disable.php:89
358
+ msgid "Don't Change"
359
+ msgstr ""
360
+
361
+ #: views/partials/_disable.php:95
362
+ msgid "Enable Avatar"
363
+ msgstr ""
364
+
365
+ #: views/partials/_disable.php:105
366
+ msgid ""
367
+ "This will change Avatar state from your entire network. If you want to "
368
+ "change the Avatar setting specifically on your subsites by enabling "
369
+ "site-wise settings, select \"Don't change\" from here."
370
+ msgstr ""
371
+
372
+ #: views/partials/_disable.php:111
373
  msgid "Disable Comments With API"
374
  msgstr ""
375
 
376
+ #: views/partials/_disable.php:112
377
  msgid ""
378
  "You can disable comments made on your website using WordPress "
379
  "specifications."
380
  msgstr ""
381
 
382
+ #: views/partials/_disable.php:122
383
  msgid "Disable Comments via XML-RPC"
384
  msgstr ""
385
 
386
+ #: views/partials/_disable.php:131
387
  msgid "Disable Comments via REST API"
388
  msgstr ""
389
 
390
+ #: views/partials/_disable.php:135
391
  msgid ""
392
  "Turning on these settings will disable any comments made on your website "
393
  "via XML-RPC or REST API specifications."
394
  msgstr ""
395
 
396
+ #: views/partials/_disable.php:140
397
  msgid "Save Changes"
398
  msgstr ""
399
 
473
  msgstr ""
474
 
475
  #. Author URI of the plugin/theme
476
+ msgid "https://wpdeveloper.com"
477
  msgstr ""
478
 
479
  #: disable-comments.php:716
readme.txt CHANGED
@@ -1,11 +1,11 @@
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.net/
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.8
7
  Requires PHP: 5.6
8
- Stable tag: 2.3.1
9
  License: GPL-3.0-or-later
10
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
11
 
@@ -17,7 +17,7 @@ Allows administrators to globally disable comments on their site. Comments can b
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.net/plugins/disable-comments/) ◼️ [Documentation](https://wpdeveloper.net/docs-category/disable-comments/) ◼️ [Support Forum](https://wordpress.org/support/plugin/disable-comments/)
21
 
22
  https://www.youtube.com/watch?v=EpuYs9Nf_nY
23
 
@@ -43,7 +43,7 @@ https://www.youtube.com/watch?v=J9AteKzQpPs
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.net/docs/how-to-disable-comments-made-via-xml-rpc/) & [REST-API](https://wpdeveloper.net/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
@@ -56,7 +56,7 @@ Please delete any existing comments on your site **before applying this setting*
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.net/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
 
@@ -95,12 +95,12 @@ Some of the plugin’s behavior can be modified by site administrators and plugi
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.net/).
99
 
100
 
101
  ### 💙 LOVED DISABLE COMMENTS?
102
 
103
- - For documentation and tutorials go to our [Documentation](https://wpdeveloper.net/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
 
@@ -108,7 +108,7 @@ These definitions can be made either in your main `wp-config.php` or in your the
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.net/plugins/disable-comments/)
112
 
113
 
114
  ### 🔥 GET FREEBIES FOR YOUR WORDPRESS SITE
@@ -134,7 +134,7 @@ Consider checking out our other WordPress solutions & boost your WordPress websi
134
  ⚡ [Flexia](https://wordpress.org/themes/flexia/): Most lightweight, customizable & multi purpose theme for WordPress.
135
 
136
 
137
- Visit [WPDeveloper](https://wpdeveloper.net/) to learn more about how to do better in WordPress with [Help Tutorial, Tips & Tricks](https://wpdeveloper.net/blog).
138
 
139
 
140
 
@@ -159,7 +159,7 @@ Visit [WPDeveloper](https://wpdeveloper.net/) to learn more about how to do bett
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.net/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
 
@@ -191,6 +191,10 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/)
191
  and this project adheres to [Semantic Versioning](http://semver.org/).
192
  This will be maiintained from August 19, 2020 - @asif2bd
193
 
 
 
 
 
194
  = [2.3.1] - 2021-12-14 =
195
  * Added: You can enable or disable Avatar from Disable Comments settings.
196
 
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.8
7
  Requires PHP: 5.6
8
+ Stable tag: 2.3.2
9
  License: GPL-3.0-or-later
10
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
11
 
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
 
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
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
 
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
 
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
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
 
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
 
191
  and this project adheres to [Semantic Versioning](http://semver.org/).
192
  This will be maiintained from August 19, 2020 - @asif2bd
193
 
194
+ = [2.3.2] - 2021-12-20 =
195
+ * Added: Configure Disable Avatar settings from the main network of Multisite Network.
196
+ * Fixed: Disable Comments via REST API toggle mismatch issue.
197
+
198
  = [2.3.1] - 2021-12-14 =
199
  * Added: You can enable or disable Avatar from Disable Comments settings.
200
 
views/partials/_disable.php CHANGED
@@ -25,7 +25,7 @@
25
  $type = 'disabled';
26
  include DC_PLUGIN_VIEWS_PATH . 'partials/_sites.php';
27
  ?>
28
- <p class="disable__option__description"><span class="danger"><?php _e('Note:', 'disable-comments'); ?></span> <?php _e('All the underneath settings will be applied for these selected sub sites.', 'disable-comments'); ?></p>
29
  </div>
30
  <?php elseif($this->options['sitewide_settings'] && !empty($this->options['is_network_options'])):?>
31
  <div class="disable_option dc-text__block mb30 mt30">
@@ -68,8 +68,8 @@
68
  <div class="disable__switchs">
69
  <div class="dissable__switch__item">
70
  <input type="hidden" name="disable_avatar" value="0">
71
- <input type="checkbox" id="switch-api" name="disable_avatar" value="1" <?php checked(!get_option('show_avatars', false)); ?>>
72
- <label for="switch-api">
73
  <span class="switch">
74
  <span class="switch__text on"><?php _e('On', 'disable-comments'); ?></span>
75
  <span class="switch__text off"><?php _e('Off', 'disable-comments'); ?></span>
@@ -77,8 +77,34 @@
77
  </label>
78
  </div>
79
  </div>
80
- <p class="disable__option__description"><span class="danger"><?php _e('Note:', 'disable-comments'); ?></span> <?php _e('This will remove Avatar from your entire website.', 'disable-comments'); ?></p>
81
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
82
  <?php endif;?>
83
  </div>
84
  <div class="disable__comment__option mb50">
25
  $type = 'disabled';
26
  include DC_PLUGIN_VIEWS_PATH . 'partials/_sites.php';
27
  ?>
28
+ <p class="disable__option__description"><span class="danger"><?php _e('Note:', 'disable-comments'); ?></span> <?php _e('All the underneath settings (except Avatar settings) will be applied for these selected sub sites.', 'disable-comments'); ?></p>
29
  </div>
30
  <?php elseif($this->options['sitewide_settings'] && !empty($this->options['is_network_options'])):?>
31
  <div class="disable_option dc-text__block mb30 mt30">
68
  <div class="disable__switchs">
69
  <div class="dissable__switch__item">
70
  <input type="hidden" name="disable_avatar" value="0">
71
+ <input type="checkbox" id="disable_avatar" name="disable_avatar" value="1" <?php checked(!get_option('show_avatars', false)); ?>>
72
+ <label for="disable_avatar">
73
  <span class="switch">
74
  <span class="switch__text on"><?php _e('On', 'disable-comments'); ?></span>
75
  <span class="switch__text off"><?php _e('Off', 'disable-comments'); ?></span>
77
  </label>
78
  </div>
79
  </div>
80
+ <p class="disable__option__description"><span class="danger"><?php _e('Note:', 'disable-comments'); ?></span> <?php _e('This will change Avatar state from your entire site.', 'disable-comments'); ?></p>
81
  </div>
82
+ <?php else:?>
83
+ <div class="disable_option dc-text__block mt30">
84
+ <h3><?php _e("Avatar settings:", 'disable-comments');?></h3>
85
+ <div class="disable__switch">
86
+ <div class="avatar__status">
87
+ <input type="radio" id="dont_change" name="disable_avatar" value="-1" <?php checked($avatar_status, -1); ?>>
88
+ <label for="dont_change">
89
+ <?php _e('Don\'t Change', 'disable-comments'); ?>
90
+ </label>
91
+ </div>
92
+ <div class="avatar__status">
93
+ <input type="radio" id="enable_avatar" name="disable_avatar" value="0" <?php checked($avatar_status, 0); ?>>
94
+ <label for="enable_avatar">
95
+ <?php _e('Enable Avatar', 'disable-comments'); ?>
96
+ </label>
97
+ </div>
98
+ <div class="avatar__status">
99
+ <input type="radio" id="disable_avatar" name="disable_avatar" value="1" <?php checked($avatar_status, 1); ?>>
100
+ <label for="disable_avatar">
101
+ <?php _e('Disable Avatar', 'disable-comments'); ?>
102
+ </label>
103
+ </div>
104
+ </div>
105
+ <p class="disable__option__description"><span class="danger"><?php _e('Note:', 'disable-comments'); ?></span> <?php _e('This will change Avatar state from your entire network. If you want to change the Avatar setting specifically on your subsites by enabling site-wise settings, select "Don\'t change" from here.', 'disable-comments'); ?></p>
106
+ </div>
107
+
108
  <?php endif;?>
109
  </div>
110
  <div class="disable__comment__option mb50">
views/partials/_menu.php CHANGED
@@ -1,10 +1,10 @@
1
  <div class="footer__nav">
2
  <ul>
3
- <li><a href="<?php echo esc_url('https://wpdeveloper.net/about/'); ?>" target="_blank" rel="nofollow"><?php _e('About Us', 'disable-comments'); ?></a></li>
4
- <li><a href="<?php echo esc_url('https://wpdeveloper.net/plugins/'); ?>" target="_blank" rel="nofollow"><?php _e('All Plugins', 'disable-comments'); ?></a></li>
5
- <li><a href="<?php echo esc_url('https://wpdeveloper.net/support/'); ?>" target="_blank" rel="nofollow"><?php _e('Support Forum', 'disable-comments'); ?></a></li>
6
- <li><a href="<?php echo esc_url('https://wpdeveloper.net/docs/'); ?>" target="_blank" rel="nofollow"><?php _e('Docs', 'disable-comments'); ?></a></li>
7
- <li><a href="<?php echo esc_url('https://wpdeveloper.net/terms-and-conditions/'); ?>" target="_blank" rel="nofollow"><?php _e('Terms Of Service', 'disable-comments'); ?></a></li>
8
- <li><a href="<?php echo esc_url('https://wpdeveloper.net/privacy-policy/'); ?>" target="_blank" rel="nofollow"><?php _e('Privacy', 'disable-comments'); ?></a></li>
9
  </ul>
10
  </div>
1
  <div class="footer__nav">
2
  <ul>
3
+ <li><a href="<?php echo esc_url('https://wpdeveloper.com/about/'); ?>" target="_blank" rel="nofollow"><?php _e('About Us', 'disable-comments'); ?></a></li>
4
+ <li><a href="<?php echo esc_url('https://wpdeveloper.com/plugins/'); ?>" target="_blank" rel="nofollow"><?php _e('All Plugins', 'disable-comments'); ?></a></li>
5
+ <li><a href="<?php echo esc_url('https://wpdeveloper.com/support/'); ?>" target="_blank" rel="nofollow"><?php _e('Support Forum', 'disable-comments'); ?></a></li>
6
+ <li><a href="<?php echo esc_url('https://wpdeveloper.com/docs/'); ?>" target="_blank" rel="nofollow"><?php _e('Docs', 'disable-comments'); ?></a></li>
7
+ <li><a href="<?php echo esc_url('https://wpdeveloper.com/terms-and-conditions/'); ?>" target="_blank" rel="nofollow"><?php _e('Terms Of Service', 'disable-comments'); ?></a></li>
8
+ <li><a href="<?php echo esc_url('https://wpdeveloper.com/privacy-policy/'); ?>" target="_blank" rel="nofollow"><?php _e('Privacy', 'disable-comments'); ?></a></li>
9
  </ul>
10
  </div>
views/partials/_sidebar.php CHANGED
@@ -23,7 +23,7 @@
23
  </g>
24
  </svg>
25
  </div>
26
- <h4><a href="<?php echo esc_url('https://wpdeveloper.net/docs/disable-comments-plugin/'); ?>" target="_blank" rel="nofollow"><?php _e('What Does This Disable Comments Plugin Do', 'disable-comments'); ?></a></h4>
27
  </div>
28
  <div class="tutorial__item">
29
  <div class="icon">
@@ -46,7 +46,7 @@
46
  </g>
47
  </svg>
48
  </div>
49
- <h4><a href="<?php echo esc_url('https://wpdeveloper.net/docs/how-to-use-disable-comments-plugin-with-wp-cli-command-line/'); ?>" target="_blank" rel="nofollow"><?php _e('How To Use Disable Comments Plugin With WP-CLI', 'disable-comments'); ?></a></h4>
50
  </div>
51
  <div class="tutorial__item">
52
  <div class="icon">
@@ -69,7 +69,7 @@
69
  </g>
70
  </svg>
71
  </div>
72
- <h4><a href="<?php echo esc_url('https://wpdeveloper.net/docs/disable-specific-types-of-posts/'); ?>" target="_blank" rel="nofollow"><?php _e('How to Disable Comments on Specific Types Of Posts', 'disable-comments'); ?></a></h4>
73
  </div>
74
  <div class="tutorial__item">
75
  <div class="icon">
@@ -92,7 +92,7 @@
92
  </g>
93
  </svg>
94
  </div>
95
- <h4><a href="<?php echo esc_url('https://wpdeveloper.net/docs/disable-comments-for-some-particular-post/'); ?>" target="_blank" rel="nofollow"><?php _e('Disable Comments For Some Particular Post', 'disable-comments'); ?></a></h4>
96
  </div>
97
  <div class="tutorial__item">
98
  <div class="icon">
@@ -115,7 +115,7 @@
115
  </g>
116
  </svg>
117
  </div>
118
- <h4><a href="<?php echo esc_url('https://wpdeveloper.net/docs/disable-comment-for-wordpress-media-files/'); ?>" target="_blank" rel="nofollow"><?php _e('Disable Comment For WordPress Media Files', 'disable-comments'); ?></a></h4>
119
  </div>
120
  </div>
121
  </div>
@@ -125,7 +125,7 @@
125
  <a href="<?php echo esc_url('https://youtu.be/J9AteKzQpPs'); ?>" class="play__btn" target="_blank" rel="nofollow"><span></span></a>
126
  </div>
127
  <div class="blog__post__content">
128
- <h4><a href="<?php echo esc_url('https://wpdeveloper.net/docs/disable-comments-for-wordpress-pages/'); ?>" target="_blank" rel="nofollow"><?php _e('Disable Comments For WordPress Pages', 'disable-comments'); ?></a></h4>
129
  </div>
130
  </article>
131
  </div>
23
  </g>
24
  </svg>
25
  </div>
26
+ <h4><a href="<?php echo esc_url('https://wpdeveloper.com/docs/disable-comments-plugin/'); ?>" target="_blank" rel="nofollow"><?php _e('What Does This Disable Comments Plugin Do', 'disable-comments'); ?></a></h4>
27
  </div>
28
  <div class="tutorial__item">
29
  <div class="icon">
46
  </g>
47
  </svg>
48
  </div>
49
+ <h4><a href="<?php echo esc_url('https://wpdeveloper.com/docs/how-to-use-disable-comments-plugin-with-wp-cli-command-line/'); ?>" target="_blank" rel="nofollow"><?php _e('How To Use Disable Comments Plugin With WP-CLI', 'disable-comments'); ?></a></h4>
50
  </div>
51
  <div class="tutorial__item">
52
  <div class="icon">
69
  </g>
70
  </svg>
71
  </div>
72
+ <h4><a href="<?php echo esc_url('https://wpdeveloper.com/docs/disable-specific-types-of-posts/'); ?>" target="_blank" rel="nofollow"><?php _e('How to Disable Comments on Specific Types Of Posts', 'disable-comments'); ?></a></h4>
73
  </div>
74
  <div class="tutorial__item">
75
  <div class="icon">
92
  </g>
93
  </svg>
94
  </div>
95
+ <h4><a href="<?php echo esc_url('https://wpdeveloper.com/docs/disable-comments-for-some-particular-post/'); ?>" target="_blank" rel="nofollow"><?php _e('Disable Comments For Some Particular Post', 'disable-comments'); ?></a></h4>
96
  </div>
97
  <div class="tutorial__item">
98
  <div class="icon">
115
  </g>
116
  </svg>
117
  </div>
118
+ <h4><a href="<?php echo esc_url('https://wpdeveloper.com/docs/disable-comment-for-wordpress-media-files/'); ?>" target="_blank" rel="nofollow"><?php _e('Disable Comment For WordPress Media Files', 'disable-comments'); ?></a></h4>
119
  </div>
120
  </div>
121
  </div>
125
  <a href="<?php echo esc_url('https://youtu.be/J9AteKzQpPs'); ?>" class="play__btn" target="_blank" rel="nofollow"><span></span></a>
126
  </div>
127
  <div class="blog__post__content">
128
+ <h4><a href="<?php echo esc_url('https://wpdeveloper.com/docs/disable-comments-for-wordpress-pages/'); ?>" target="_blank" rel="nofollow"><?php _e('Disable Comments For WordPress Pages', 'disable-comments'); ?></a></h4>
129
  </div>
130
  </article>
131
  </div>