Disable Comments - Version 1.0.20

Version Description

  • Fixed navigation issues
Download this release

Release Info

Developer rbplugins
Plugin Icon 128x128 Disable Comments
Version 1.0.20
Comparing to
See all releases

Code changes from version 1.0.19 to 1.0.20

class_rb_disable-comments.php → classDisableComments.php RENAMED
@@ -11,7 +11,7 @@ if( !defined('WPINC') || !defined("ABSPATH") ){
11
  }
12
 
13
 
14
- class Rbs_Disable_Comments {
15
 
16
  private static $instance = null;
17
 
@@ -29,6 +29,7 @@ class Rbs_Disable_Comments {
29
  public function __construct() {
30
  $this->options = get_option( $this->options_name , array() );
31
  $this->hooks();
 
32
  }
33
 
34
 
@@ -65,6 +66,9 @@ class Rbs_Disable_Comments {
65
  }
66
 
67
  public function wp_load_hooks(){
 
 
 
68
  $disabled_post_types = $this->get_disabled_post_types();
69
 
70
  if( !empty( $disabled_post_types ) ) {
@@ -249,8 +253,33 @@ class Rbs_Disable_Comments {
249
 
250
 
251
  public function options() {
252
- //include( RB_DISABLE_COMMENTS_PATH .'information.php');
253
  include( RB_DISABLE_COMMENTS_PATH .'options.php');
254
  }
255
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
256
  }
11
  }
12
 
13
 
14
+ class classDisableComments {
15
 
16
  private static $instance = null;
17
 
29
  public function __construct() {
30
  $this->options = get_option( $this->options_name , array() );
31
  $this->hooks();
32
+
33
  }
34
 
35
 
66
  }
67
 
68
  public function wp_load_hooks(){
69
+
70
+ $this->install_plugin();
71
+
72
  $disabled_post_types = $this->get_disabled_post_types();
73
 
74
  if( !empty( $disabled_post_types ) ) {
253
 
254
 
255
  public function options() {
256
+ include( RB_DISABLE_COMMENTS_PATH .'information.php');
257
  include( RB_DISABLE_COMMENTS_PATH .'options.php');
258
  }
259
 
260
+
261
+ public function install_plugin() {
262
+ if(
263
+ isset($_GET['rb_forms_install_plugin']) &&
264
+ $_GET['rb_forms_install_plugin']
265
+ ){
266
+ //$action = 'activate';
267
+ $action = 'install-plugin';
268
+ $plugin = 'forms-rb';
269
+ $url = sprintf( admin_url( 'plugins.php?action=%s&plugin=%s&plugin_status=all&paged=1&s' ), $action, $plugin );
270
+ $_REQUEST['plugin'] = $plugin;
271
+ $url = wp_nonce_url( $url, $action . '-plugin_' . $plugin );
272
+ echo $url;
273
+ //return $url;
274
+ //sanitize_key( $_GET['rb_forms_install_plugin'] )
275
+
276
+
277
+ echo esc_url(
278
+ wp_nonce_url(
279
+ self_admin_url('update.php?action=install-plugin&plugin=' . $plugin),
280
+ 'install-plugin_' . $plugin)
281
+ );
282
+ }
283
+ }
284
+
285
  }
disable-comments-rb.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Disable Comments RB
4
  Plugin URI: https://robosoft.co/wordpress-plugins/disable-comments
5
  Description: Easy tool to disable comments for your blog posts, pages. Admin can disable comments in just few clicks. Delete comments from blog post.
6
- Version: 1.0.19
7
  Author: rbPlugins
8
  Author URI: https://robosoft.co/wordpress-plugins/disable-comments
9
  License: GPL2
@@ -15,8 +15,8 @@ if (!defined('WPINC') || !defined("ABSPATH")) {
15
  die();
16
  }
17
  define("RB_DISABLE_COMMENTS_PATH", plugin_dir_path(__FILE__));
18
- define("RB_DISABLE_COMMENTS_VERSION", '1.0.19');
19
 
20
- include_once(RB_DISABLE_COMMENTS_PATH .'class_rb_disable-comments.php');
21
 
22
- Rbs_Disable_Comments::get_instance();
3
  Plugin Name: Disable Comments RB
4
  Plugin URI: https://robosoft.co/wordpress-plugins/disable-comments
5
  Description: Easy tool to disable comments for your blog posts, pages. Admin can disable comments in just few clicks. Delete comments from blog post.
6
+ Version: 1.0.20
7
  Author: rbPlugins
8
  Author URI: https://robosoft.co/wordpress-plugins/disable-comments
9
  License: GPL2
15
  die();
16
  }
17
  define("RB_DISABLE_COMMENTS_PATH", plugin_dir_path(__FILE__));
18
+ define("RB_DISABLE_COMMENTS_VERSION", '1.0.20');
19
 
20
+ include_once(RB_DISABLE_COMMENTS_PATH .'classDisableComments.php');
21
 
22
+ classDisableComments::get_instance();
information.php CHANGED
@@ -1,111 +1,207 @@
1
  <?php
2
- /*
3
  * RB Disable Comments
4
  * Version: 1.0.9 - 38451
5
  * Author: RBS
6
  * Date: 03 02 2020 12:11:29 GMT
7
  */
8
 
9
- if( !defined('WPINC') || !defined("ABSPATH") ){
10
  die();
11
  }
12
- wp_enqueue_script( 'plugin-install' );
13
- add_thickbox();
14
 
 
 
 
 
 
15
  ?>
16
  <style type="text/css">
17
- .rbs_nw_wrap{
18
- margin-bottom: 10px;
19
- display: grid;
20
- grid-template-columns: 1fr 1fr 1fr 1fr;
21
- column-gap: 15px;
22
- margin-right: 25px;
23
- }
24
- .rbs_nw_item{
25
- background-color: #f9f9f9;
26
- margin: 0;
27
- }
28
- .rbs_nw_item_logo{
29
- text-align: center;
30
- padding-top: 10px;
31
- padding-bottom: 1px;
32
- }
33
- .rbs_nw_item_logo_plugin{
34
- width: 100px;
35
- height: 100px;
36
- }
37
- .rbs_nw_item_logo_upz{
38
- margin-top: 10px;
39
- margin-bottom: 1px;
40
- width: 225px;
41
- height: 66px;
42
- }
43
- .rbs_nw_item_header{
44
- text-align: center;
45
- text-align: center;
46
- line-height: 1.4em;
47
- min-height: 40px;
48
- padding: 5px;
49
- margin-top: 5px;
50
- }
51
- .rbs_nw_item_button{
52
- text-align: center;
53
- margin-bottom: 15px;
54
- }
55
 
 
 
 
 
 
 
56
 
57
- @media only screen and (max-width: 1100px) {
58
- .rbs_nw_wrap{
59
- grid-template-columns: 1fr 1fr;
 
 
 
 
60
  }
61
- .rbs_nw_item{
 
 
62
  margin-bottom: 15px;
63
  }
64
- }
65
 
66
- @media only screen and (max-width: 800px) {
67
- .rbs_nw_wrap{
68
- grid-template-columns: 1fr;
69
- column-gap: 0;
70
- row-gap: 15px;
71
- margin: 0;
72
- }
73
- .rbs_nw_item{
74
- margin-bottom: 0px;
75
- display: none;
76
- }
77
- .rbs_nw_item:nth-child(1),
78
- .rbs_nw_item:nth-child(2){
79
- display: block;
80
- }
81
- .rbs_nw_item_header{
82
- margin-bottom: 0px;
83
- }
84
-
85
- .rbs_nw_item_logo{
86
- text-align: left;
87
- float: left;
88
- }
89
- .rbs_nw_item_logo_upz{
90
- margin-top: 7px;
91
- margin-bottom: 7px;
92
- width: 120px;
93
- height: 80px;
94
- }
95
- .rbs_nw_item_logo_plugin{
96
- margin-top: 0px;
97
- margin-left: 15px;
98
- margin-right: 5px;
99
- margin-bottom: 2px;
100
- width: 80px;
101
- height: 80px;
102
- }
103
- }
104
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
105
  </style>
106
 
107
- <div class="rbs_nw_wrap">
108
- <?php $urlPlugin = plugin_dir_url( __FILE__ ); ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
109
  <div class="rbs_nw_item">
110
  <div class="rbs_nw_item_logo">
111
  <img class="rbs_nw_item_logo_plugin" src="<?php echo $urlPlugin; ?>assets/images/logo_dp.png" width="100" hight="100">
@@ -113,10 +209,10 @@ add_thickbox();
113
  <h3 class="rbs_nw_item_header">
114
  <?php _e('Simple plugin that allows you to duplicate post easily'); ?>
115
  </h3>
116
- <div class="rbs_nw_item_button">
117
- <a class="button-primary thickbox" href="<?php
118
- echo self_admin_url( 'plugin-install.php?tab=plugin-information&amp;plugin=duplicate-post-rb&amp;TB_iframe=true' );
119
- ?>">
120
  <?php _e('Install Duplicate Post'); ?>
121
  </a>
122
  </div>
@@ -129,10 +225,10 @@ add_thickbox();
129
  <h3 class="rbs_nw_item_header">
130
  <?php _e('Simple plugin that allows you to disable right click option easily'); ?>
131
  </h3>
132
- <div class="rbs_nw_item_button">
133
- <a class="button-primary thickbox" href="<?php
134
- echo self_admin_url( 'plugin-install.php?tab=plugin-information&amp;plugin=disable-right-click-rb&amp;TB_iframe=true' );
135
- ?>">
136
  <?php _e('Install Disable Right Click'); ?>
137
  </a>
138
  </div>
@@ -145,15 +241,15 @@ add_thickbox();
145
  <h3 class="rbs_nw_item_header">
146
  <?php _e('Create Free Gallery with Premium features with Robo Gallery'); ?>
147
  </h3>
148
- <div class="rbs_nw_item_button">
149
- <a class="button-primary thickbox" href="<?php
150
- echo self_admin_url( 'plugin-install.php?tab=plugin-information&amp;plugin=robo-gallery&amp;TB_iframe=true' );
151
- ?>">
152
  <?php _e('Install Gallery'); ?>
153
  </a>
154
  </div>
155
  </div>
156
-
157
  <div class="rbs_nw_item">
158
  <div class="rbs_nw_item_logo">
159
  <img class="rbs_nw_item_logo_upz" src="<?php echo $urlPlugin; ?>assets/images/upzilla_black_logo.svg" width="225" hight="67">
@@ -161,9 +257,9 @@ add_thickbox();
161
  <h3 class="rbs_nw_item_header">
162
  <?php _e('Free website uptime and performance monitoring service for your WordPress', 'disable-comments-rb'); ?>
163
  </h3>
164
- <div class="rbs_nw_item_button">
165
  <a class="button-primary" href="https://www.upzilla.co/?pk_campaign=wp_dc" target="_blank">
166
- <?php _e('Register Free Account'); ?></a>
167
  </div>
168
  </div>
169
  </div>
1
  <?php
2
+ /*
3
  * RB Disable Comments
4
  * Version: 1.0.9 - 38451
5
  * Author: RBS
6
  * Date: 03 02 2020 12:11:29 GMT
7
  */
8
 
9
+ if (!defined('WPINC') || !defined("ABSPATH")) {
10
  die();
11
  }
12
+ /* wp_enqueue_script( array( 'updates') );
13
+ add_thickbox(); */
14
 
15
+ /*add_action('admin_menu', 'disable_comments_rb_js');
16
+ function disable_comments_rb_js() {
17
+ add_thickbox();
18
+ }
19
+ */
20
  ?>
21
  <style type="text/css">
22
+ .rbs_nw_wrap {
23
+ margin-bottom: 10px;
24
+ display: grid;
25
+ grid-template-columns: 1fr 1fr 1fr 1fr;
26
+ column-gap: 15px;
27
+ margin-right: 25px;
28
+ }
29
+
30
+ .rbs_nw_item {
31
+ background-color: #f9f9f9;
32
+ margin: 0;
33
+ }
34
+
35
+ .rbs_nw_item_logo {
36
+ text-align: center;
37
+ padding-top: 10px;
38
+ padding-bottom: 1px;
39
+ }
40
+
41
+ .rbs_nw_item_logo_plugin {
42
+ width: 100px;
43
+ height: 100px;
44
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
45
 
46
+ .rbs_nw_item_logo_upz {
47
+ margin-top: 10px;
48
+ margin-bottom: 1px;
49
+ width: 225px;
50
+ height: 66px;
51
+ }
52
 
53
+ .rbs_nw_item_header {
54
+ text-align: center;
55
+ text-align: center;
56
+ line-height: 1.4em;
57
+ min-height: 40px;
58
+ padding: 5px;
59
+ margin-top: 5px;
60
  }
61
+
62
+ .rbs_nw_item_button {
63
+ text-align: center;
64
  margin-bottom: 15px;
65
  }
 
66
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
67
 
68
+ @media only screen and (max-width: 1100px) {
69
+ .rbs_nw_wrap {
70
+ grid-template-columns: 1fr 1fr;
71
+ }
72
+
73
+ .rbs_nw_item {
74
+ margin-bottom: 15px;
75
+ }
76
+ }
77
+
78
+ @media only screen and (max-width: 800px) {
79
+ .rbs_nw_wrap {
80
+ grid-template-columns: 1fr;
81
+ column-gap: 0;
82
+ row-gap: 15px;
83
+ margin: 0;
84
+ }
85
+
86
+ .rbs_nw_item {
87
+ margin-bottom: 0px;
88
+ display: none;
89
+ }
90
+
91
+ .rbs_nw_item:nth-child(1),
92
+ .rbs_nw_item:nth-child(2) {
93
+ display: block;
94
+ }
95
+
96
+ .rbs_nw_item_header {
97
+ margin-bottom: 0px;
98
+ }
99
+
100
+ .rbs_nw_item_logo {
101
+ text-align: left;
102
+ float: left;
103
+ }
104
+
105
+ .rbs_nw_item_logo_upz {
106
+ margin-top: 7px;
107
+ margin-bottom: 7px;
108
+ width: 120px;
109
+ height: 80px;
110
+ }
111
+
112
+ .rbs_nw_item_logo_plugin {
113
+ margin-top: 0px;
114
+ margin-left: 15px;
115
+ margin-right: 5px;
116
+ margin-bottom: 2px;
117
+ width: 80px;
118
+ height: 80px;
119
+ }
120
+ }
121
+
122
+ .rbs-info-oneline {
123
+ margin-bottom: 10px;
124
+ display: grid;
125
+ grid-template-columns: 1fr;
126
+ grid-template-rows: 1fr;
127
+ column-gap: 0;
128
+ margin-right: 25px;
129
+ justify-items: start center;
130
+ background-color: #f9f9f9;
131
+ }
132
+
133
+ .rbs-info-oneline-item {
134
+ margin: 0;
135
+ }
136
+
137
+ .rbs-info-oneline-header {
138
+ text-align: left;
139
+ padding: 5px;
140
+ font-size: 22px;
141
+ padding-left: 20px;
142
+ ;
143
+ }
144
+
145
+ .rbs-info-oneline-header a:not(.class){
146
+ margin-left: 40px;
147
+
148
+ }
149
+
150
+ @media only screen and (max-width: 800px) {
151
+ .rbs-info-oneline-header {
152
+ line-height: 32px;
153
+
154
+ ;
155
+ }
156
+ }
157
  </style>
158
 
159
+ <?php
160
+
161
+ $urlPlugin = plugin_dir_url(__FILE__);
162
+
163
+ $plugin = "forms-rb";
164
+ $plugin_dir = WP_PLUGIN_DIR . '/'.$plugin;
165
+ $plugin_file = $plugin . '/' . $plugin . '.php';
166
+ $is_active = is_plugin_active($plugin_file);
167
+
168
+ if(!$is_active){
169
+
170
+ ?>
171
+ <div class="rbs-info-oneline">
172
+
173
+ <div class="rbs-info-oneline-item">
174
+
175
+ <h3 class="rbs-info-oneline-header">
176
+ <?php _e('RB Forms - absolutely FREE contact form plugin for WordPress'); ?>
177
+ <a class="button-primary " aria-label="Install Rb Forms" data-title="Install Rb Forms" href="<?php
178
+
179
+ //file_exists($plugin_file)
180
+ if ( is_dir( $plugin_dir ) ){
181
+
182
+ if ( strpos( $plugin_file, '/' ) ) {
183
+ $plugin_file = str_replace( '\/', '%2F', $plugin_file );
184
+ }
185
+ $url = sprintf( admin_url( 'plugins.php?action=activate&plugin=%s&plugin_status=all&paged=1' ), $plugin_file );
186
+ $url = wp_nonce_url( $url, 'activate-plugin_' . $plugin_file );
187
+ echo $url;
188
+ } else {
189
+ echo esc_url(
190
+ wp_nonce_url( self_admin_url('update.php?action=install-plugin&plugin=' . $plugin), 'install-plugin_' . $plugin)
191
+ );
192
+ }
193
+ //echo esc_url(network_admin_url('plugin-install.php?tab=plugin-information&amp;plugin=forms-rb&amp;TB_iframe=true&amp;width=772&amp;height=378') );
194
+ ?>">
195
+ <?php _e('Install Rb Forms'); ?>
196
+ </a>
197
+ </h3>
198
+
199
+ </div>
200
+ </div>
201
+ <?php
202
+ }
203
+ return ; ?>
204
+ <div class="rbs_nw_wrap">
205
  <div class="rbs_nw_item">
206
  <div class="rbs_nw_item_logo">
207
  <img class="rbs_nw_item_logo_plugin" src="<?php echo $urlPlugin; ?>assets/images/logo_dp.png" width="100" hight="100">
209
  <h3 class="rbs_nw_item_header">
210
  <?php _e('Simple plugin that allows you to duplicate post easily'); ?>
211
  </h3>
212
+ <div class="rbs_nw_item_button">
213
+ <a class="button-primary thickbox" href="<?php
214
+ echo self_admin_url('plugin-install.php?tab=plugin-information&amp;plugin=duplicate-post-rb&amp;TB_iframe=true');
215
+ ?>">
216
  <?php _e('Install Duplicate Post'); ?>
217
  </a>
218
  </div>
225
  <h3 class="rbs_nw_item_header">
226
  <?php _e('Simple plugin that allows you to disable right click option easily'); ?>
227
  </h3>
228
+ <div class="rbs_nw_item_button">
229
+ <a class="button-primary thickbox" href="<?php
230
+ echo self_admin_url('plugin-install.php?tab=plugin-information&amp;plugin=disable-right-click-rb&amp;TB_iframe=true');
231
+ ?>">
232
  <?php _e('Install Disable Right Click'); ?>
233
  </a>
234
  </div>
241
  <h3 class="rbs_nw_item_header">
242
  <?php _e('Create Free Gallery with Premium features with Robo Gallery'); ?>
243
  </h3>
244
+ <div class="rbs_nw_item_button">
245
+ <a class="button-primary thickbox" href="<?php
246
+ echo self_admin_url('plugin-install.php?tab=plugin-information&amp;plugin=robo-gallery&amp;TB_iframe=true');
247
+ ?>">
248
  <?php _e('Install Gallery'); ?>
249
  </a>
250
  </div>
251
  </div>
252
+
253
  <div class="rbs_nw_item">
254
  <div class="rbs_nw_item_logo">
255
  <img class="rbs_nw_item_logo_upz" src="<?php echo $urlPlugin; ?>assets/images/upzilla_black_logo.svg" width="225" hight="67">
257
  <h3 class="rbs_nw_item_header">
258
  <?php _e('Free website uptime and performance monitoring service for your WordPress', 'disable-comments-rb'); ?>
259
  </h3>
260
+ <div class="rbs_nw_item_button">
261
  <a class="button-primary" href="https://www.upzilla.co/?pk_campaign=wp_dc" target="_blank">
262
+ <?php _e('Register Free Account'); ?></a>
263
  </div>
264
  </div>
265
  </div>
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: rbplugins
3
  Tags: disable comments, comments, disable
4
  Requires at least: 3.1
5
  Tested up to: 6.0
6
- Stable tag: 1.0.19
7
  License: GPLv2 or later
8
 
9
  Disable Comments - easy tool to disable comments for your blog posts, pages. Admin can disable comments in just few clicks. Delete comments from blog post.
@@ -43,13 +43,13 @@ There is few ways to install plugin on your wordpress blog. First of all you can
43
 
44
  After installation of the disable comments plugin ou need to open plugin settings and enable main function to disable comments for your blog.
45
 
46
- = If I wish to disable comments for some particular post ? =
47
 
48
  You don't need this plugin.
49
 
50
  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.
51
 
52
- = If some comments interface elements stay published after plugin activation ? =
53
 
54
  This is could be a reason of some conflict. If you have some custom theme. Theme could overwrite some elements styles and layouts. If you have such a problem please contact our support team to sort it.
55
 
@@ -61,6 +61,9 @@ This is could be a reason of some conflict. If you have some custom theme. Theme
61
 
62
  == Changelog ==
63
 
 
 
 
64
  = 1.0.19 =
65
  * Compatibility with Wordpress 6.0
66
 
3
  Tags: disable comments, comments, disable
4
  Requires at least: 3.1
5
  Tested up to: 6.0
6
+ Stable tag: 1.0.20
7
  License: GPLv2 or later
8
 
9
  Disable Comments - easy tool to disable comments for your blog posts, pages. Admin can disable comments in just few clicks. Delete comments from blog post.
43
 
44
  After installation of the disable comments plugin ou need to open plugin settings and enable main function to disable comments for your blog.
45
 
46
+ = If I wish to disable comments for some particular post? =
47
 
48
  You don't need this plugin.
49
 
50
  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.
51
 
52
+ = If some comments interface elements stay published after plugin activation? =
53
 
54
  This is could be a reason of some conflict. If you have some custom theme. Theme could overwrite some elements styles and layouts. If you have such a problem please contact our support team to sort it.
55
 
61
 
62
  == Changelog ==
63
 
64
+ = 1.0.20 =
65
+ * Fixed navigation issues
66
+
67
  = 1.0.19 =
68
  * Compatibility with Wordpress 6.0
69