PluginProbe
Adminify – White Label, Admin Menu Editor, Login Customizer / 4.0.2.5
Adminify – White Label, Admin Menu Editor, Login Customizer v4.0.2.5
4.3.2 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 All 165 releases
← All changes | Inc/Admin/Options/White_Label.php +51 -88 4.2.254.0.2.5 View file →
@@ -1,12 +1,10 @@
1 1 <?php
2 2
3 -namespace PXLBSAdminify\Inc\Admin\Options;
3 +namespace WPAdminify\Inc\Admin\Options;
4 4
5 -use PXLBSAdminify\Inc\Utils;
6 -use PXLBSAdminify\Inc\Admin\AdminSettings;
7 -use PXLBSAdminify\Inc\Admin\AdminSettingsModel;
8 -use PXLBSAdminify\Inc\Classes\AdminFooterText;
5 +use WPAdminify\Inc\Utils;
6 +use WPAdminify\Inc\Admin\AdminSettingsModel;
9 7
10 8 if ( ! defined( 'ABSPATH' ) ) {
11 9 die;
12 10 } // Cannot access directly.
@@ -12,9 +10,8 @@
12 10 } // Cannot access directly.
13 11
14 12 class White_Label extends AdminSettingsModel {
15 13
16 -
17 14 public function __construct() {
18 15 $this->white_label_settings();
19 16 }
20 17
@@ -24,10 +21,14 @@
24 21 'wordpress' => [
25 22 'admin_bar_cleanup' => [],
26 23 'remove_howdy_msg' => false,
27 24 'change_howdy_text' => __('Howdy', 'adminify'),
28 - 'show_footer_credit' => false,
29 - 'footer_text' => AdminFooterText::get_default_footer_credit(),
25 + 'footer_text' => sprintf(
26 + __('<p>Developed by <a href="%1$s" target="_blank" title="WP Adminify by Jewel Theme" target="_blank">%2$s</a></p> <p>Powered by <a target="_blank" href="%3$s">WordPress</a></p>', 'adminify'),
27 + esc_url('https://wpadminify.com/'),
28 + \WPAdminify\Inc\Admin\AdminSettings::get_pro_label(),
29 + esc_url('https://wordpress.org/')
30 + ),
30 31 'admin_footer' => [
31 32 'ip_address',
32 33 'php_version',
33 34 'wp_version',
@@ -38,12 +39,12 @@
38 39 ],
39 40 'adminify' => [
40 41 'plugin_logo' => [],
41 42 'plugin_logo_dark' => [],
42 - 'plugin_name' => \PXLBSAdminify\Inc\Admin\AdminSettings::get_pro_label(),
43 - 'plugin_desc' => __('Adminify is a powerful plugin that modernizes and customizes your WordPress admin dashboard. It offers a clean, branded interface and advanced menu management features to enhance your admin user experience.', 'adminify'),
43 + 'plugin_name' => \WPAdminify\Inc\Admin\AdminSettings::get_pro_label(),
44 + 'plugin_desc' => __('WP Adminify is a powerful plugin that modernizes and customizes your WordPress admin dashboard. It offers a clean, branded interface and advanced menu management features to enhance your admin user experience.', 'adminify'),
44 45 'author_name' => 'Jewel Theme',
45 - 'menu_label' => \PXLBSAdminify\Inc\Admin\AdminSettings::get_pro_label(),
46 + 'menu_label' => \WPAdminify\Inc\Admin\AdminSettings::get_pro_label(),
46 47 'menu_icon' => [],
47 48 'plugin_url' => 'https://wpadminify.com',
48 49 'row_links' => false,
49 50 'remove_action_links' => false,
@@ -53,9 +54,9 @@
53 54 ]
54 55 ];
55 56 }
56 57
57 - public function pxlbsadminify_wordpress_white_label_fields(&$white_label)
58 + public function jltwp_wordpress_white_label_fields(&$white_label)
58 59 {
59 60 $admin_bar_items = [
60 61 // 'menu_toggle' => __('Menu Toggle', 'adminify'),
61 62 'wp_logo' => __('WordPress Logo', 'adminify'),
@@ -60,12 +61,10 @@
60 61 // 'menu_toggle' => __('Menu Toggle', 'adminify'),
61 62 'wp_logo' => __('WordPress Logo', 'adminify'),
62 63 'site_name' => __('Site Name', 'adminify'),
63 64 'comments' => __('Comments', 'adminify'),
64 - /* translators: %s: pro upgrade badge HTML */
65 - 'updates' => sprintf(__('Updates %s', 'adminify'), Utils::upgrade_pro_class()),
66 - /* translators: %s: pro upgrade badge HTML */
67 - 'new_content' => sprintf(__('"New" Button %s', 'adminify'), Utils::upgrade_pro_class()),
65 + 'updates' => sprintf(__('Updates %s', 'adminify'), Utils::adminify_upgrade_pro_class()),
66 + 'new_content' => sprintf(__('"New" Button %s', 'adminify'), Utils::adminify_upgrade_pro_class()),
68 67 ];
69 68 $admin_footer_items = [
70 69 'ip_address' => __('Show IP Address', 'adminify'),
71 70 'php_version' => __('Show PHP Version', 'adminify'),
@@ -77,14 +76,14 @@
77 76
78 77 $white_label[] = [
79 78 'id' => 'white_label_subheading',
80 79 'type' => 'subheading',
81 - 'content' => Utils::help_urls(
80 + 'content' => Utils::adminfiy_help_urls(
82 81 __('"WordPress" White Label Settings', 'adminify'),
83 - 'https://wpadminify.com/docs/adminify/white-label/wordpress-white-label-features',
84 - 'https://www.youtube.com/watch?v=zDK_MwIcTpc',
82 + 'https://wpadminify.com/kb/white-label/',
83 + '',
85 84 'https://www.facebook.com/groups/jeweltheme',
86 - \PXLBSAdminify\Inc\Admin\AdminSettings::support_url()
85 + \WPAdminify\Inc\Admin\AdminSettings::support_url()
87 86 )
88 87 ];
89 88
90 89
@@ -130,18 +129,8 @@
130 129 'options' => $admin_footer_items,
131 130 'default' => $this->get_default_field('white_label')['wordpress']['admin_footer'],
132 131 ];
133 132 $white_label[] = [
134 - 'id' => 'show_footer_credit',
135 - 'type' => 'switcher',
136 - 'title' => __('Show Footer Credit', 'adminify'),
137 - 'subtitle' => __('Display the default "Developed by / Powered by" credit in the admin footer. Disabled by default; enable to opt in.', 'adminify'),
138 - 'text_on' => __('Yes', 'adminify'),
139 - 'text_off' => __('No', 'adminify'),
140 - 'text_width' => 80,
141 - 'default' => $this->get_default_field('white_label')['wordpress']['show_footer_credit'],
142 - ];
143 - $white_label[] = [
144 133 'id' => 'footer_text',
145 134 'type' => 'wp_editor',
146 135 'title' => __( 'Admin Footer Text', 'adminify' ),
147 136 'height' => '100px',
@@ -148,22 +137,13 @@
148 137 'media_buttons' => false,
149 138 'tinymce' => false,
150 139 'subtitle' => 'Left Side WordPress Admin Footer Text ',
151 140 'default' => $this->get_default_field( 'white_label')['wordpress']['footer_text' ],
152 - 'dependency' => ['show_footer_credit', '==', 'true', 'true'],
153 141 ];
154 142
155 - $white_label = apply_filters('pxlbsadminify_settings/wp_white_label', $white_label, $this);
143 + $white_label = apply_filters('adminify_settings/wp_white_label', $white_label, $this);
156 144 }
157 145
158 - public static function pxlbsadminify_white_label_options(){
159 - $adminify_options = get_option('pxlbsadminify_settings');
160 - if( isset($adminify_options['white_label']) && !empty($adminify_options['white_label']) ){
161 - return $adminify_options['white_label'];
162 - }else{
163 - return [];
164 - }
165 - }
166 146 /**
167 147 * White Label Settings: White Label Fields
168 148 *
169 149 * @param [type] $white_label
@@ -169,23 +149,17 @@
169 149 * @param [type] $white_label
170 150 *
171 151 * @return void
172 152 */
173 - public function pxlbsadminify_white_label_fields( &$white_label ) {
153 + public function jltwp_white_label_fields( &$white_label ) {
174 154
175 155
176 156 $wp_white_label = [];
177 157 $adminify_white_label = [];
178 158
179 - $this->pxlbsadminify_wordpress_white_label_fields($wp_white_label);
159 + $this->jltwp_wordpress_white_label_fields($wp_white_label);
160 + $this->jltwp_adminify_white_label_fields($adminify_white_label);
180 161
181 - $pxlbsadminify_white_label_options = self::pxlbsadminify_white_label_options();
182 - $adminify_white_label_plugin_option_enabled = !empty($pxlbsadminify_white_label_options['plugin_option']) ? $pxlbsadminify_white_label_options['plugin_option'] : '';
183 -
184 - if(empty($adminify_white_label_plugin_option_enabled)){
185 - $this->pxlbsadminify_adminify_white_label_fields($adminify_white_label);
186 - }
187 -
188 162 $white_label[] = [
189 163 'id' => 'white_label',
190 164 'type' => 'fieldset',
191 165 'class' => 'adminify-one-col adminify-pl-0',
@@ -213,9 +187,9 @@
213 187 * @param [type] $white_label
214 188 *
215 189 * @return void
216 190 */
217 - public function pxlbsadminify_adminify_white_label_fields( &$adminify_whl_fields ) {
191 + public function jltwp_adminify_white_label_fields( &$adminify_whl_fields ) {
218 192
219 193 $adminify_white_label_class = 'adminify-white-label adminify-pro-feature adminify-pro-notice';
220 194
221 195 $adminify_whl_fields[] = [
@@ -221,17 +195,15 @@
221 195 $adminify_whl_fields[] = [
222 196 'id' => 'adminify_whl_sub_heading',
223 197 'type' => 'subheading',
224 198 'class' => 'adminify-mt-10 adminify-agency-plan',
225 - 'content' => Utils::help_urls(
226 - /* translators: %s: pro plan badge HTML */
227 - '<span>' . sprintf( __('"Adminify" Branding %s', 'adminify'), Utils::upgrade_pro_badge('Agency or Higher Plan Only')) . '</span>',
228 - 'https://wpadminify.com/docs/adminify/white-label/rebrand-wp-adminify-plugin',
229 - 'https://www.youtube.com/watch?v=zDK_MwIcTpc',
199 + 'content' => Utils::adminfiy_help_urls(
200 + sprintf(__('<span>"WP Adminify" Branding %s</span>', 'adminify'), Utils::adminify_upgrade_pro_badge('Agency or Higher Plan Only')),
201 + 'https://wpadminify.com/kb/adminify-white-label/',
202 + 'https://www.youtube.com/playlist?list=PLqpMw0NsHXV-EKj9Xm1DMGa6FGniHHly8',
230 203 'https://www.facebook.com/groups/jeweltheme',
231 - \PXLBSAdminify\Inc\Admin\AdminSettings::support_url()
204 + \WPAdminify\Inc\Admin\AdminSettings::support_url()
232 205 ),
233 - 'dependency' => ['plugin_option', '==', 'false', 'true'],
234 206 ];
235 207 $adminify_whl_fields[] = [
236 208 'id' => 'plugin_logo',
237 209 'type' => 'media',
@@ -245,9 +217,8 @@
245 217 ),
246 218 'remove_title' => __('Remove Logo Image', 'adminify'),
247 219 'default' => $this->get_default_field( 'white_label')['adminify']['plugin_logo'],
248 220 'dependency' => ['admin_ui_mode', '==', 'light', 'true'],
249 - 'dependency' => ['plugin_option', '==', 'false', 'true'],
250 221 ];
251 222 $adminify_whl_fields[] = [
252 223 'id' => 'plugin_logo_dark',
253 224 'type' => 'media',
@@ -258,41 +229,36 @@
258 229 'button_title' => __('Add Logo Image', 'adminify'),
259 230 'remove_title' => __('Remove Logo Image', 'adminify'),
260 231 'default' => $this->get_default_field('white_label')['adminify']['plugin_logo_dark'],
261 232 'dependency' => ['admin_ui_mode', '==', 'dark', 'true'],
262 - 'dependency' => ['plugin_option', '==', 'false', 'true'],
263 233 ];
264 234 $adminify_whl_fields[] = [
265 - 'id' => 'plugin_name',
266 - 'type' => 'text',
267 - 'class' => $adminify_white_label_class . ' adminify-pro-pointer',
268 - 'title' => __('Plugin Name', 'adminify'),
269 - 'default' => $this->get_default_field('white_label')['adminify']['plugin_name'],
270 - 'dependency' => ['plugin_option', '==', 'false', 'true'],
235 + 'id' => 'plugin_name',
236 + 'type' => 'text',
237 + 'class' => $adminify_white_label_class,
238 + 'title' => __('Plugin Name', 'adminify'),
239 + 'default' => $this->get_default_field('white_label')['adminify']['plugin_name'],
271 240 ];
272 241 $adminify_whl_fields[] = [
273 - 'id' => 'plugin_desc',
274 - 'type' => 'textarea',
275 - 'class' => $adminify_white_label_class . ' adminify-pro-pointer',
276 - 'title' => __('Plugin Description', 'adminify'),
277 - 'default' => $this->get_default_field('white_label')['adminify']['plugin_desc'],
278 - 'dependency' => ['plugin_option', '==', 'false', 'true'],
242 + 'id' => 'plugin_desc',
243 + 'type' => 'textarea',
244 + 'class' => $adminify_white_label_class,
245 + 'title' => __('Plugin Description', 'adminify'),
246 + 'default' => $this->get_default_field('white_label')['adminify']['plugin_desc'],
279 247 ];
280 248 $adminify_whl_fields[] = [
281 249 'id' => 'author_name',
282 250 'type' => 'text',
283 - 'class' => $adminify_white_label_class . ' adminify-pro-pointer',
251 + 'class' => $adminify_white_label_class,
284 252 'title' => __('Developer/Agency Name', 'adminify'),
285 253 'default' => $this->get_default_field('white_label')['adminify']['author_name'],
286 - 'dependency' => ['plugin_option', '==', 'false', 'true'],
287 254 ];
288 255 $adminify_whl_fields[] = [
289 256 'id' => 'menu_label',
290 257 'type' => 'text',
291 - 'class' => $adminify_white_label_class . ' adminify-pro-pointer',
258 + 'class' => $adminify_white_label_class,
292 259 'title' => __('Menu Label', 'adminify'),
293 260 'default' => $this->get_default_field('white_label')['adminify']['menu_label'],
294 - 'dependency' => ['plugin_option', '==', 'false', 'true'],
295 261 ];
296 262 $adminify_whl_fields[] = [
297 263 'id' => 'menu_icon',
298 264 'type' => 'media',
@@ -302,32 +268,29 @@
302 268 'preview_size' => 'thumbnail',
303 269 'button_title' => __('Add Menu Icon', 'adminify'),
304 270 'remove_title' => __('Remove Menu Icon', 'adminify'),
305 271 'default' => $this->get_default_field('white_label')['adminify']['menu_icon'],
306 - 'dependency' => ['plugin_option', '==', 'false', 'true'],
307 272 ];
308 273 $adminify_whl_fields[] = [
309 274 'id' => 'plugin_url',
310 275 'type' => 'text',
311 - 'class' => $adminify_white_label_class . ' adminify-pro-pointer',
276 + 'class' => $adminify_white_label_class,
312 277 'title' => __(
313 278 'Plugin URL',
314 279 'adminify'
315 280 ),
316 281 'default' => $this->get_default_field('white_label')['adminify']['plugin_url'],
317 - 'dependency' => ['plugin_option', '==', 'false', 'true'],
318 282 ];
319 283 $adminify_whl_fields[] = [
320 284 'id' => 'row_links',
321 285 'title' => __('Hide All Row Meta Links', 'adminify'),
322 - 'subtitle' => __('All Plugin Meta Links will be removed - Upgrade, Settings etc', 'adminify'),
286 + 'subtitle' => __('All Plugin Meta Links will be removed - Upgrade, Opt In, Settings etc', 'adminify'),
323 287 'type' => 'switcher',
324 - 'class' => $adminify_white_label_class . ' adminify-pro-pointer',
288 + 'class' => $adminify_white_label_class,
325 289 'text_on' => __('Yes', 'adminify'),
326 290 'text_off' => __('No', 'adminify'),
327 291 'text_width' => 80,
328 292 'default' => $this->get_default_field('white_label')['adminify']['row_links'],
329 - 'dependency' => ['plugin_option', '==', 'false', 'true'],
330 293 ];
331 294 $adminify_whl_fields[] = [
332 295 'id' => 'remove_action_links',
333 296 'title' => __('Remove Action Links', 'adminify'),
@@ -332,28 +295,28 @@
332 295 'id' => 'remove_action_links',
333 296 'title' => __('Remove Action Links', 'adminify'),
334 297 'type' => 'checkbox',
335 298 'inline' => true,
336 - 'class' => $adminify_white_label_class . ' adminify-pro-pointer',
299 + 'class' => $adminify_white_label_class,
337 300 'options' => [
338 301 'upgrade' => __('Upgrade', 'adminify'),
339 302 'activate_license' => __('Activate/Change License', 'adminify'),
340 - // 'opt_in_out' => __('Opt In/Out', 'adminify'),
303 + 'opt_in_out' => __('Opt In/Out', 'adminify'),
341 304 'settings' => __('Settings', 'adminify'),
342 305 'account' => __('Account', 'adminify'),
343 306 ],
344 307 'default' => $this->get_default_field('white_label')['adminify']['remove_action_links'],
345 - 'dependency' => ['row_links|plugin_option', '==|==', 'false|false', 'true'],
308 + 'dependency' => ['row_links', '==', 'false', 'true'],
346 309 ];
347 310 $adminify_whl_fields[] = [
348 311 'id' => 'plugin_option',
349 312 'type' => 'checkbox',
350 - 'class' => $adminify_white_label_class . ' adminify-full-width-field adminify-hightlight-field adminify-one-col adminify-mt-6 adminify-pro-pointer',
351 - 'label' => __('Force Disable White Label (Adminify): When enabled, the White Label settings will be completely hidden. To access them again, you\'ll need to deactivate and reactivate Adminify Plugin.', 'adminify'),
313 + 'class' => 'adminify-full-width-field adminify-hightlight-field adminify-one-col adminify-mt-6' . $adminify_white_label_class,
314 + 'label' => __('Enable Force Disable "White Label" Options: If you enable this option, White Label option will be completely hidden. If you want it back, You have to deactivate and activate plugin to make it work again.', 'adminify'),
352 315 'default' => $this->get_default_field('white_label')['adminify']['plugin_option'],
353 316 ];
354 317
355 - $adminify_whl_fields = apply_filters('pxlbsadminify_settings/adminify_white_label', $adminify_whl_fields, $this);
318 + $adminify_whl_fields = apply_filters('adminify_settings/adminify_white_label', $adminify_whl_fields, $this);
356 319 }
357 320
358 321
359 322 /*
@@ -364,9 +327,9 @@
364 327 return;
365 328 }
366 329
367 330 $fields = [];
368 - $this->pxlbsadminify_white_label_fields($fields);
331 + $this->jltwp_white_label_fields($fields);
369 332
370 333 \ADMINIFY::createSection(
371 334 $this->prefix,
372 335 [