Disable Comments - Version 1.0.15

Version Description

  • Update admin interface section, menu and navigation
Download this release

Release Info

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

Code changes from version 1.0.14 to 1.0.15

assets/images/logo_dp.png ADDED
Binary file
assets/images/logo_drc.png ADDED
Binary file
class_rb_disable-comments.php CHANGED
@@ -85,7 +85,7 @@ class Rbs_Disable_Comments {
85
 
86
  if( is_admin() ) {
87
 
88
- add_action( 'admin_menu', array( $this, 'settings_menu' ) );
89
  add_filter( 'plugin_action_links', array( $this, 'plugin_actions_links'), 10, 2 );
90
 
91
  if( isset($this->options['remove_everywhere']) && $this->options['remove_everywhere'] ) {
@@ -134,13 +134,18 @@ class Rbs_Disable_Comments {
134
 
135
 
136
  private function settings_page_url() {
137
- return add_query_arg( 'page', 'rb_disable_comments_settings', admin_url( 'options-general.php' ) );
 
138
  }
139
 
140
 
141
  public function setup_notice(){
142
  if( strpos( get_current_screen()->id, 'settings_page_rb_disable_comments_settings' ) === 0 )
143
  return;
 
 
 
 
144
  $hascaps = current_user_can( 'manage_options' );
145
  if( $hascaps ) {
146
  echo '<div class="updated fade"><p>' . sprintf( __( 'The <em>Disable Comments</em> plugin is active, but isn\'t configured to do anything yet. Visit the <a href="%s">configuration page</a> to choose which post types to disable comments on.', 'disable-comments-rb'), esc_attr( $this->settings_page_url() ) ) . '</p></div>';
@@ -211,11 +216,26 @@ class Rbs_Disable_Comments {
211
  return $links;
212
  }
213
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
214
 
215
- public function settings_menu() {
216
- $title = __( 'Rb Disable Comments', 'disable-comments-rb' );
217
- add_submenu_page( 'options-general.php', $title, $title, 'manage_options', 'rb_disable_comments_settings', array( $this, 'options' ) );
218
- }
219
 
220
 
221
  public function options() {
85
 
86
  if( is_admin() ) {
87
 
88
+ add_action( 'admin_menu', array( $this, 'settingsMenu' ) );
89
  add_filter( 'plugin_action_links', array( $this, 'plugin_actions_links'), 10, 2 );
90
 
91
  if( isset($this->options['remove_everywhere']) && $this->options['remove_everywhere'] ) {
134
 
135
 
136
  private function settings_page_url() {
137
+ //return add_query_arg( 'page', 'rb_disable_comments_settings', admin_url( 'options-general.php' ) );
138
+ return add_query_arg('page', 'rb_disable_comments_settings', admin_url('admin.php'));
139
  }
140
 
141
 
142
  public function setup_notice(){
143
  if( strpos( get_current_screen()->id, 'settings_page_rb_disable_comments_settings' ) === 0 )
144
  return;
145
+
146
+ if( strpos( get_current_screen()->id, 'rb-plugins_page_rb_disable_comments_settings' ) === 0 )
147
+ return;
148
+
149
  $hascaps = current_user_can( 'manage_options' );
150
  if( $hascaps ) {
151
  echo '<div class="updated fade"><p>' . sprintf( __( 'The <em>Disable Comments</em> plugin is active, but isn\'t configured to do anything yet. Visit the <a href="%s">configuration page</a> to choose which post types to disable comments on.', 'disable-comments-rb'), esc_attr( $this->settings_page_url() ) ) . '</p></div>';
216
  return $links;
217
  }
218
 
219
+
220
+ public function pluginsListPage()
221
+ {
222
+ echo "empty page";
223
+ }
224
+
225
+
226
+ public function settingsMenu()
227
+ {
228
+ $menu_exits = menu_page_url( 'rb_plugins_settings', false );
229
+ if(!$menu_exits){
230
+ $title_plugins = __('RB Plugins', 'disable-right-click-rb');
231
+ add_menu_page( $title_plugins, $title_plugins, null, 'rb_plugins_settings', array($this, 'pluginsListPage'), 'dashicons-rest-api', 20);
232
+ add_action('admin_head', array($this, 'addAdminCss'));
233
+ }
234
+
235
+ $title = __('Disable Comments', 'disable-comments-rb');
236
+ add_submenu_page('rb_plugins_settings', $title, $title, 'manage_options', 'rb_disable_comments_settings', array($this, 'options'));
237
+ }
238
 
 
 
 
 
239
 
240
 
241
  public function options() {
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.14
7
  Author: rbPlugins
8
  Author URI: https://robosoft.co/wordpress-plugins/disable-comments
9
  License: GPL2
@@ -11,13 +11,12 @@ Text Domain: disable-comments-rb
11
  Domain Path: /languages/
12
  */
13
 
14
- if( !defined('WPINC') || !defined("ABSPATH") ) die();
 
 
 
 
15
 
16
- define("RB_DISABLE_COMMENTS_VERSION", '1.0.14' );
17
-
18
- define("RB_DISABLE_COMMENTS_PATH", plugin_dir_path( __FILE__ ) );
19
- define("RB_DISABLE_COMMENTS_URL", plugin_dir_url( __FILE__ ) );
20
-
21
- include_once( RB_DISABLE_COMMENTS_PATH .'class_rb_disable-comments.php');
22
 
23
  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.15
7
  Author: rbPlugins
8
  Author URI: https://robosoft.co/wordpress-plugins/disable-comments
9
  License: GPL2
11
  Domain Path: /languages/
12
  */
13
 
14
+ 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.15');
19
 
20
+ include_once(RB_DISABLE_COMMENTS_PATH .'class_rb_disable-comments.php');
 
 
 
 
 
21
 
22
  Rbs_Disable_Comments::get_instance();
information.php CHANGED
@@ -10,44 +10,59 @@ if( !defined('WPINC') || !defined("ABSPATH") ){
10
  die();
11
  }
12
  wp_enqueue_script( 'plugin-install' );
13
- //if ( 'plugin-information' != $tab ) {
14
- add_thickbox();
15
- //}
16
 
17
  ?>
18
  <style type="text/css">
19
  .rbs_nw_wrap{
20
  margin-bottom: 10px;
21
  display: grid;
22
- grid-template-columns: 1fr 1fr;
23
- column-gap: 25px;
24
  margin-right: 25px;
25
- }
26
  .rbs_nw_item{
27
  background-color: #f9f9f9;
28
  margin: 0;
29
  }
30
  .rbs_nw_item_logo{
31
  text-align: center;
32
- padding: 10px;
 
33
  }
34
- .rbs_nw_item_logo_ro{
35
- width: 150px;
36
- height: 150px;
37
  }
38
  .rbs_nw_item_logo_upz{
39
- margin-top: 30px;
40
- margin-bottom: 15px;
41
  width: 225px;
42
- height: 100px;
43
  }
44
  .rbs_nw_item_header{
45
  text-align: center;
 
 
 
 
 
46
  }
47
  .rbs_nw_item_button{
48
  text-align: center;
49
- margin-bottom: 10px;
 
 
 
 
 
 
 
 
 
 
50
  }
 
51
  @media only screen and (max-width: 800px) {
52
  .rbs_nw_wrap{
53
  grid-template-columns: 1fr;
@@ -55,6 +70,17 @@ wp_enqueue_script( 'plugin-install' );
55
  row-gap: 15px;
56
  margin: 0;
57
  }
 
 
 
 
 
 
 
 
 
 
 
58
 
59
  .rbs_nw_item_logo{
60
  text-align: left;
@@ -66,7 +92,7 @@ wp_enqueue_script( 'plugin-install' );
66
  width: 120px;
67
  height: 80px;
68
  }
69
- .rbs_nw_item_logo_ro{
70
  margin-top: 0px;
71
  margin-left: 15px;
72
  margin-right: 5px;
@@ -75,12 +101,46 @@ wp_enqueue_script( 'plugin-install' );
75
  height: 80px;
76
  }
77
  }
 
78
  </style>
79
 
80
  <div class="rbs_nw_wrap">
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
81
  <div class="rbs_nw_item">
82
  <div class="rbs_nw_item_logo">
83
- <img class="rbs_nw_item_logo_ro" src="<?php echo RB_DISABLE_COMMENTS_URL; ?>assets/images/logo_rg.gif" width="150" hight="150">
84
  </div>
85
  <h3 class="rbs_nw_item_header">
86
  <?php _e('Create Free Gallery with Premium features with Robo Gallery'); ?>
@@ -96,7 +156,7 @@ wp_enqueue_script( 'plugin-install' );
96
 
97
  <div class="rbs_nw_item">
98
  <div class="rbs_nw_item_logo">
99
- <img class="rbs_nw_item_logo_upz" src="<?php echo RB_DISABLE_COMMENTS_URL; ?>assets/images/upzilla_black_logo.svg" width="225" hight="100">
100
  </div>
101
  <h3 class="rbs_nw_item_header">
102
  <?php _e('Free website uptime and performance monitoring service for your WordPress', 'disable-comments-rb'); ?>
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;
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;
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;
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">
112
+ </div>
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>
123
+ </div>
124
+
125
+ <div class="rbs_nw_item">
126
+ <div class="rbs_nw_item_logo">
127
+ <img class="rbs_nw_item_logo_plugin" src="<?php echo $urlPlugin; ?>assets/images/logo_drc.png" width="100" hight="100">
128
+ </div>
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>
139
+ </div>
140
+
141
  <div class="rbs_nw_item">
142
  <div class="rbs_nw_item_logo">
143
+ <img class="rbs_nw_item_logo_plugin" src="<?php echo $urlPlugin; ?>assets/images/logo_rg.gif" width="100" hight="100">
144
  </div>
145
  <h3 class="rbs_nw_item_header">
146
  <?php _e('Create Free Gallery with Premium features with Robo Gallery'); ?>
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">
160
  </div>
161
  <h3 class="rbs_nw_item_header">
162
  <?php _e('Free website uptime and performance monitoring service for your WordPress', 'disable-comments-rb'); ?>
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: 5.8
6
- Stable tag: 1.0.14
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.
@@ -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.14 =
65
  * Update admin interface section
66
 
3
  Tags: disable comments, comments, disable
4
  Requires at least: 3.1
5
  Tested up to: 5.8
6
+ Stable tag: 1.0.15
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.
61
 
62
  == Changelog ==
63
 
64
+ = 1.0.15 =
65
+ * Update admin interface section, menu and navigation
66
+
67
  = 1.0.14 =
68
  * Update admin interface section
69