PluginProbe
Adminify – White Label, Admin Menu Editor, Login Customizer / 4.0.3.7
Adminify – White Label, Admin Menu Editor, Login Customizer v4.0.3.7
4.3.1 4.3.0 4.2.26 4.2.25 4.2.24 4.2.23 4.2.22 4.2.21 4.2.20 4.2.19 4.2.18 4.2.17 4.2.16 4.2.15 4.2.14 4.2.13 4.2.12 4.2.11 4.2.10 4.2.9 4.2.8 4.2.7 4.2.6 4.2.5 4.1.17 All 164 releases
← All changes | Inc/Modules/DisableComments/DisableComments.php +13 -10 4.2.214.0.3.7 View file →
@@ -1,10 +1,13 @@
1 1 <?php
2 2
3 -namespace PXLBSAdminify\Inc\Modules\DisableComments;
3 +namespace WPAdminify\Inc\Modules\DisableComments;
4 4
5 -use PXLBSAdminify\Inc\Admin\AdminSettings;
6 -use PXLBSAdminify\Inc\Admin\AdminSettingsModel;
5 +use \Elementor;
6 +use WPAdminify\Inc\Utils;
7 +use WPAdminify\Inc\Classes\Multisite_Helper;
8 +use WPAdminify\Inc\Admin\AdminSettings;
9 +use WPAdminify\Inc\Admin\AdminSettingsModel;
7 10
8 11
9 12 // no direct access allowed
10 13 if ( ! defined( 'ABSPATH' ) ) {
@@ -11,9 +14,9 @@
11 14 exit;
12 15 }
13 16
14 17 /**
15 - * PXLBSAdminify
18 + * WPAdminify
16 19 *
17 20 * @package Module: Disable Comments
18 21 *
19 22 * @author Jewel Theme <support@jeweltheme.com>
@@ -51,10 +54,10 @@
51 54 }
52 55
53 56 // Remove comments links from admin bar
54 57 if (!empty($this->disable_comments['apply_for']) && in_array('admin_bar', $this->disable_comments['apply_for'])) {
55 - // add_action('init', [$this, 'disable_comments_admin_bar_menu']);
56 - add_action( 'wp_before_admin_bar_render', [ $this, 'remove_admin_bar_menus' ], 0 );
58 + // add_action('init', [$this, 'jltma_adminify_disable_comments_admin_bar_menu']);
59 + add_action( 'wp_before_admin_bar_render', [ $this, 'jltma_adminify_remove_admin_bar_menus' ], 0 );
57 60 }
58 61
59 62 // URL field remove from Comments
60 63 if (!empty($this->disable_comments['apply_for']) && in_array('comments_url_field', $this->disable_comments['apply_for'])) {
@@ -113,9 +116,9 @@
113 116
114 117
115 118 // Remove styles for .recentcomments
116 119 if (!empty($this->disable_comments['apply_for']) && in_array('recentcomments', $this->disable_comments['apply_for'])) {
117 - add_action('widgets_init', [$this, 'remove_recent_comments_style']);
120 + add_action('widgets_init', [$this, 'jltwp_adminify_remove_recent_comments_style']);
118 121 add_filter( 'show_recent_comments_widget_style', '__return_false' );
119 122 }
120 123
121 124 // Redirect any user trying to access comments page.
@@ -134,9 +137,9 @@
134 137 add_filter('rest_pre_insert_comment', [$this, 'return_blank_comment'], 10, 2);
135 138 }
136 139
137 140 // Remove styles for .recentcomments
138 - public function remove_recent_comments_style()
141 + public function jltwp_adminify_remove_recent_comments_style()
139 142 {
140 143 global $wp_widget_factory;
141 144 remove_action('wp_head', [$wp_widget_factory->widgets['WP_Widget_Recent_Comments'], 'recent_comments_style']);
142 145 }
@@ -188,15 +191,15 @@
188 191 return $defaults;
189 192 }
190 193
191 194 /* Remove from the administration bar */
192 - public function remove_admin_bar_menus() {
195 + public function jltma_adminify_remove_admin_bar_menus() {
193 196 global $wp_admin_bar;
194 197 $wp_admin_bar->remove_menu( 'comments' );
195 198 }
196 199
197 200 // Remove Comments Menu
198 - public function disable_comments_admin_bar_menu() {
201 + public function jltma_adminify_disable_comments_admin_bar_menu() {
199 202 if ( is_admin_bar_showing() ) {
200 203 remove_action( 'admin_bar_menu', 'wp_admin_bar_comments_menu', 60 );
201 204 }
202 205 }