| @@ -1,10 +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\AdminSettingsModel; | |
| 5 | +use WPAdminify\Inc\Utils; | |
| 6 | +use WPAdminify\Inc\Admin\AdminSettingsModel; | |
| 7 | 7 | |
| 8 | 8 | |
| 9 | 9 | if ( ! defined( 'ABSPATH' ) ) { |
| 10 | 10 | die; |
| @@ -16,56 +16,17 @@ | ||
| 16 | 16 | public $defaults = []; |
| 17 | 17 | |
| 18 | 18 | public function __construct() { |
| 19 | 19 | $this->tweak_settings(); |
| 20 | - add_action('admin_footer', [$this, 'redirect_url_auto_fill_script']); | |
| 21 | 20 | } |
| 22 | 21 | |
| 23 | - /** | |
| 24 | - * Auto-fill New Register URL placeholder based on New Login URL | |
| 25 | - */ | |
| 26 | - public function redirect_url_auto_fill_script() { | |
| 27 | - $screen = get_current_screen(); | |
| 28 | - if (!$screen || strpos($screen->id, 'wp-adminify') === false) { | |
| 29 | - return; | |
| 30 | - } | |
| 31 | - ?> | |
| 32 | - <script> | |
| 33 | - jQuery(document).ready(function($) { | |
| 34 | - // Find the login URL and register URL fields | |
| 35 | - var $loginField = $('input[data-depend-id="new_login_url"]'); | |
| 36 | - var $registerField = $('input[data-depend-id="new_register_url"]'); | |
| 37 | - | |
| 38 | - if ($loginField.length && $registerField.length) { | |
| 39 | - // Update placeholder when login URL changes (not actual value) | |
| 40 | - $loginField.on('input change', function() { | |
| 41 | - var loginValue = $(this).val().trim(); | |
| 42 | - | |
| 43 | - if (loginValue) { | |
| 44 | - // Update placeholder to suggest the register URL format | |
| 45 | - $registerField.attr('placeholder', loginValue + '/?action=register'); | |
| 46 | - } else { | |
| 47 | - // Reset to default placeholder | |
| 48 | - $registerField.attr('placeholder', 'wp-login.php?action=register'); | |
| 49 | - } | |
| 50 | - }); | |
| 51 | - | |
| 52 | - // Also update placeholder on page load if login has value | |
| 53 | - var initialLogin = $loginField.val().trim(); | |
| 54 | - if (initialLogin) { | |
| 55 | - $registerField.attr('placeholder', initialLogin + '/?action=register'); | |
| 56 | - } | |
| 57 | - } | |
| 58 | - }); | |
| 59 | - </script> | |
| 60 | - <?php | |
| 61 | - } | |
| 62 | - | |
| 63 | 22 | protected function get_defaults() { |
| 64 | 23 | return [ |
| 65 | 24 | 'security_head' => [ |
| 66 | 25 | 'enable_security_head' => false, |
| 67 | - 'security_head_data' => [], | |
| 26 | + 'security_head_data' => [ | |
| 27 | + 'generator_wp_version' | |
| 28 | + ], | |
| 68 | 29 | 'self_ping_sites' => '' |
| 69 | 30 | ], |
| 70 | 31 | 'security_rest_api' => [ |
| 71 | 32 | 'security_rest_api_enable' => false, |
| @@ -90,9 +51,9 @@ | ||
| 90 | 51 | 'post_archives_data' => [], |
| 91 | 52 | ], |
| 92 | 53 | 'security_feed' => false, |
| 93 | 54 | 'users_security' => [ |
| 94 | - 'enable_users_security' => false, | |
| 55 | + 'limit_logins' => false, | |
| 95 | 56 | 'change_username' => false, |
| 96 | 57 | ], |
| 97 | 58 | 'disable_automatic_emails' => false, |
| 98 | 59 | 'disable_language_switcher_login' => false, |
| @@ -106,20 +67,22 @@ | ||
| 106 | 67 | 'redirect_admin_url' => '', |
| 107 | 68 | 'new_register_url' => '', |
| 108 | 69 | 'new_logout_url' => '', |
| 109 | 70 | 'login_redirects' => [ |
| 110 | - 'user_types' => '', | |
| 111 | - 'redirect_user' => '', | |
| 112 | - 'redirect_role' => '', | |
| 113 | - 'redirect_cap' => '', | |
| 114 | - 'redirect_url' => '', | |
| 71 | + 'user_types' => 'user_role', | |
| 72 | + 'redirect_user' => 'user_role', | |
| 73 | + 'redirect_role' => '', | |
| 74 | + 'redirect_cap' => '', | |
| 75 | + 'redirect_url' => '', | |
| 76 | + // 'redirect_order' => 10, | |
| 115 | 77 | ], |
| 116 | 78 | 'logout_redirects' => [ |
| 117 | - 'user_types' => '', | |
| 118 | - 'redirect_user' => '', | |
| 119 | - 'redirect_role' => '', | |
| 120 | - 'redirect_cap' => '', | |
| 121 | - 'redirect_url' => '', | |
| 79 | + 'user_types' => 'user_role', | |
| 80 | + 'redirect_user' => 'user_role', | |
| 81 | + 'redirect_role' => '', | |
| 82 | + 'redirect_cap' => '', | |
| 83 | + 'redirect_url' => '', | |
| 84 | + // 'redirect_order' => 10, | |
| 122 | 85 | ] |
| 123 | 86 | ], |
| 124 | 87 | ], |
| 125 | 88 | ] |
| @@ -134,9 +97,9 @@ | ||
| 134 | 97 | */ |
| 135 | 98 | public function security_head_fields( &$head_fields ) { |
| 136 | 99 | $security_head = [ |
| 137 | 100 | 'xmlrpc' => __( 'Disable XML-RPC', 'adminify' ), |
| 138 | - 'generator_wp_version' => __( 'Remove WordPress Generator Version from front end', 'adminify' ), | |
| 101 | + 'generator_wp_version' => __( 'Remove WordPress Generator Version from fornt end', 'adminify' ), | |
| 139 | 102 | 'rsd' => __( 'Remove "<link rel=\'EditURI\'..." from head section', 'adminify' ), |
| 140 | 103 | 'shortlink' => __( 'Remove "<link rel=\'shortlink\'..." from head section', 'adminify' ), |
| 141 | 104 | 'canonical' => __( 'Remove <link rel="canonical" href="https://www.site.com/some-url" /> from head section', 'adminify' ), |
| 142 | 105 | 'self_ping' => __('Disable self-ping, i.e., from your site to your site when writing posts.', 'adminify'), |
| @@ -174,9 +137,9 @@ | ||
| 174 | 137 | 'fields' => [ |
| 175 | 138 | [ |
| 176 | 139 | 'id' => 'enable_security_head', |
| 177 | 140 | 'type' => 'switcher', |
| 178 | - 'title' => '', | |
| 141 | + 'title' => __('', 'adminify'), | |
| 179 | 142 | 'class' => 'adminify-pl-0 adminify-pt-0', |
| 180 | 143 | 'text_on' => __('Show', 'adminify'), |
| 181 | 144 | 'text_off' => __('Hide', 'adminify'), |
| 182 | 145 | 'text_width' => 80, |
| @@ -185,9 +148,9 @@ | ||
| 185 | 148 | [ |
| 186 | 149 | 'id' => 'security_head_data', |
| 187 | 150 | 'type' => 'checkbox', |
| 188 | 151 | 'class' => 'adminify-one-col', |
| 189 | - 'title' => '', | |
| 152 | + 'title' => __('', 'adminify'), | |
| 190 | 153 | 'options' => $security_head, |
| 191 | 154 | 'default' => $this->get_default_field('security_head')['security_head_data'], |
| 192 | 155 | 'dependency' => ['enable_security_head', '==', 'true', 'true'] |
| 193 | 156 | ], |
| @@ -235,13 +198,24 @@ | ||
| 235 | 198 | // $logout_redirects = []; |
| 236 | 199 | $this->login_register_url_fields($settings_fields); |
| 237 | 200 | $this->roles_redirect_tabs($login_redirects); |
| 238 | 201 | |
| 202 | + $redirect_urls[] = [ | |
| 203 | + 'id' => 'security_subheading', | |
| 204 | + 'type' => 'subheading', | |
| 205 | + 'content' => Utils::adminfiy_help_urls( | |
| 206 | + __('"WordPress" White Label Settings', 'adminify'), | |
| 207 | + 'https://wpadminify.com/kb/security/', | |
| 208 | + '', | |
| 209 | + 'https://www.facebook.com/groups/jeweltheme', | |
| 210 | + 'https://wpadminify.com/support/' | |
| 211 | + ) | |
| 212 | + ]; | |
| 213 | + | |
| 239 | 214 | $redirect_urls = [ |
| 240 | 215 | [ |
| 241 | 216 | 'id' => 'redirect_urls_fields', |
| 242 | - /* translators: %s: Pro upgrade badge HTML */ | |
| 243 | - 'title' => sprintf(__('Redirect URLs %s', 'adminify'), Utils::upgrade_pro_badge()), | |
| 217 | + 'title' => sprintf(__('Redirect URLs %s', 'adminify'), Utils::adminify_upgrade_pro_badge()), | |
| 244 | 218 | 'class' => 'adminify-pro-fieldset', |
| 245 | 219 | 'subtitle' => __('Login and logout redirects based on user roles. Customize URLs for administrators, editors, or subscribers etc.', 'adminify'), |
| 246 | 220 | 'type' => 'fieldset', |
| 247 | 221 | 'fields' => [ |
| @@ -256,9 +230,9 @@ | ||
| 256 | 230 | ], |
| 257 | 231 | [ |
| 258 | 232 | 'id' => 'redirect_urls_options', |
| 259 | 233 | 'type' => 'fieldset', |
| 260 | - 'title' => ' ', | |
| 234 | + 'title' => __(' ', 'adminify'), | |
| 261 | 235 | 'class' => 'adminify-pt-0 adminify-pl-0 adminify-one-col adminify-tabs-content adminify-pro-notice', |
| 262 | 236 | 'fields' => [ |
| 263 | 237 | [ |
| 264 | 238 | 'id' => 'redirect_urls_tabs', |
| @@ -292,13 +266,9 @@ | ||
| 292 | 266 | 'id' => 'new_login_url', |
| 293 | 267 | 'type' => 'text', |
| 294 | 268 | 'class' => 'new-login-url', |
| 295 | 269 | 'title' => __('New Login URL', 'adminify'), |
| 296 | - 'desc' => sprintf( | |
| 297 | - /* translators: %s: wp-login.php URL of the site */ | |
| 298 | - __('Change the login URL and prevent access to the wp-admin and %s page directly.', 'adminify'), | |
| 299 | - '<code>' . esc_html( wp_login_url() ) . '</code>' | |
| 300 | - ), | |
| 270 | + 'desc' => __('Change the login URL and prevent access to the wp-admin and <code>' . wp_login_url() . '</code> page directly.', 'adminify'), | |
| 301 | 271 | 'placeholder' => 'login', |
| 302 | 272 | 'before' => \get_site_url() . '/', |
| 303 | 273 | // 'after' => '/', |
| 304 | 274 | 'default' => $this->get_default_field('redirect_urls_fields')['redirect_urls_options']['redirect_urls_tabs']['new_login_url'], |
| @@ -308,13 +278,9 @@ | ||
| 308 | 278 | 'id' => 'redirect_admin_url', |
| 309 | 279 | 'type' => 'text', |
| 310 | 280 | 'class' => 'new-login-url redirect-admin-url', |
| 311 | 281 | 'title' => __('Redirect Admin', 'adminify'), |
| 312 | - 'desc' => sprintf( | |
| 313 | - /* translators: %s: site admin URL */ | |
| 314 | - __('Redirect users those are not logged in and trying to access %s', 'adminify'), | |
| 315 | - '<code>' . esc_html( get_admin_url() ) . '</code>' | |
| 316 | - ), | |
| 282 | + 'desc' => __('Redirect users those are not logged in and trying to access <code>' . get_admin_url() . '</code>', 'adminify'), | |
| 317 | 283 | 'placeholder' => '404', |
| 318 | 284 | 'default' => $this->get_default_field('redirect_urls_fields')['redirect_urls_options']['redirect_urls_tabs']['redirect_admin_url'], |
| 319 | 285 | 'before' => \get_site_url() . '/', |
| 320 | 286 | // 'after' => '/', |
| @@ -324,15 +290,10 @@ | ||
| 324 | 290 | 'id' => 'new_register_url', |
| 325 | 291 | 'type' => 'text', |
| 326 | 292 | 'class' => 'new-login-url new-register-url', |
| 327 | 293 | 'title' => __('New Register URL', 'adminify'), |
| 328 | - 'subtitle' => __('Use default registration: leave empty.', 'adminify'), | |
| 329 | - 'desc' => sprintf( | |
| 330 | - /* translators: %s: opening anchor tag pointing to Settings > General, closed by </a> in the next placeholder */ | |
| 331 | - __('For default enable <strong>"Membership: Anyone can register"</strong> in %1$sSettings → General.%2$s To use custom registration: Create a Page, then paste its permalink here (e.g. /register).', 'adminify'), | |
| 332 | - '<a href="' . esc_url( admin_url('options-general.php#users_can_register') ) . '" style="color: var(--adminify-primary);">', | |
| 333 | - '</a>' | |
| 334 | - ), | |
| 294 | + 'subtitle' => __('Enable <a href="' . admin_url('options-general.php#users_can_register') . '"><b>Membership: "Anyone can register"</b></a> checkbox from Settings.', 'adminify'), | |
| 295 | + 'desc' => __('Change the Register URL, to setup the custom designed registration page.', 'adminify'), | |
| 335 | 296 | 'placeholder' => 'wp-login.php?action=register', |
| 336 | 297 | 'before' => \get_site_url() . '/', |
| 337 | 298 | // 'after' => '/', |
| 338 | 299 | 'default' => $this->get_default_field('redirect_urls_fields')['redirect_urls_options']['redirect_urls_tabs']['new_register_url'], |
| @@ -455,9 +416,9 @@ | ||
| 455 | 416 | 'id' => 'redirect_cap', |
| 456 | 417 | 'type' => 'select', |
| 457 | 418 | 'title' => __('Capability', 'adminify'), |
| 458 | 419 | 'placeholder' => __('Select a Capability', 'adminify'), |
| 459 | - 'options' => '\PXLBSAdminify\Inc\Classes\Helper::get_capability_options', | |
| 420 | + 'options' => '\WPAdminify\Inc\Classes\Helper::get_capability_options', | |
| 460 | 421 | 'default' => $this->get_default_field('redirect_urls_fields')['redirect_urls_options']['redirect_urls_tabs']['login_redirects']['redirect_cap'], |
| 461 | 422 | 'dependency' => ['user_types', '==', 'user_cap'], |
| 462 | 423 | ]; |
| 463 | 424 | |
| @@ -467,10 +428,10 @@ | ||
| 467 | 428 | 'id' => 'redirect_url', |
| 468 | 429 | 'type' => 'text', |
| 469 | 430 | 'class' => 'new-login-url', |
| 470 | 431 | 'title' => __('Redirect URL', 'adminify'), |
| 471 | - 'placeholder' => __('e.g., my-dashboard or https://example.com/page', 'adminify'), | |
| 472 | - 'desc' => __('Enter a page slug (e.g., my-dashboard) or full URL. For multisite, use full URLs for cross-site redirects.', 'adminify'), | |
| 432 | + // 'before' => \get_site_url() . '/', | |
| 433 | + 'desc' => __('Note: Full URL here. Change the URL for a User or User Roles.', 'adminify'), | |
| 473 | 434 | 'default' => $this->get_default_field('redirect_urls_fields')['redirect_urls_options']['redirect_urls_tabs']['login_redirects']['redirect_url'], |
| 474 | 435 | ]; |
| 475 | 436 | |
| 476 | 437 | // // Redirect Order |
| @@ -532,9 +493,9 @@ | ||
| 532 | 493 | 'id' => 'redirect_cap', |
| 533 | 494 | 'type' => 'select', |
| 534 | 495 | 'title' => __('Capability', 'adminify'), |
| 535 | 496 | 'placeholder' => __('Select a Capability', 'adminify'), |
| 536 | - 'options' => '\PXLBSAdminify\Inc\Classes\Helper::get_capability_options', | |
| 497 | + 'options' => '\WPAdminify\Inc\Classes\Helper::get_capability_options', | |
| 537 | 498 | 'default' => $this->get_default_field('redirect_urls_fields')['redirect_urls_options']['redirect_urls_tabs']['logout_redirects']['redirect_cap'], |
| 538 | 499 | 'dependency' => ['user_types', '==', 'user_cap'], |
| 539 | 500 | ]; |
| 540 | 501 | |
| @@ -544,10 +505,10 @@ | ||
| 544 | 505 | 'id' => 'redirect_url', |
| 545 | 506 | 'type' => 'text', |
| 546 | 507 | 'class' => 'new-login-url', |
| 547 | 508 | 'title' => __('Redirect URL', 'adminify'), |
| 548 | - 'placeholder' => __('e.g., goodbye or https://example.com/page', 'adminify'), | |
| 549 | - 'desc' => __('Enter a page slug (e.g., goodbye) or full URL. For multisite, use full URLs for cross-site redirects.', 'adminify'), | |
| 509 | + 'before' => \get_site_url() . '/', | |
| 510 | + 'desc' => __('Change the URL for a User or User Roles.', 'adminify'), | |
| 550 | 511 | 'default' => $this->get_default_field('redirect_urls_fields')['redirect_urls_options']['redirect_urls_tabs']['logout_redirects']['redirect_url'], |
| 551 | 512 | ]; |
| 552 | 513 | |
| 553 | 514 | // Redirect Order |
| @@ -565,40 +526,34 @@ | ||
| 565 | 526 | */ |
| 566 | 527 | public function security_user_security(&$users){ |
| 567 | 528 | |
| 568 | 529 | $users_settings[] = [ |
| 569 | - 'id' => 'enable_users_security', | |
| 530 | + 'id' => 'change_username', | |
| 570 | 531 | 'type' => 'switcher', |
| 571 | 532 | 'text_on' => __('Show', 'adminify'), |
| 572 | 533 | 'text_off' => __('Hide', 'adminify'), |
| 573 | - 'class' => 'adminify-pl-0 adminify-pt-0', | |
| 574 | 534 | 'text_width' => 80, |
| 575 | - 'title' => __('', 'adminify'), | |
| 576 | - 'default' => $this->get_default_field('users_security')['enable_users_security'], | |
| 535 | + 'title' => __('Username Change', 'adminify'), | |
| 536 | + 'subtitle' => sprintf(__('Remove Comments for Media attachment Template <a href="%s">More Details</a> ', 'adminify'), esc_url('https://wpadminify.com/docs')), | |
| 537 | + 'default' => $this->get_default_field('users_security')['change_username'], | |
| 577 | 538 | ]; |
| 578 | - | |
| 579 | 539 | $users_settings[] = [ |
| 580 | - 'id' => 'change_username', | |
| 540 | + 'id' => 'limit_logins', | |
| 581 | 541 | 'type' => 'switcher', |
| 582 | 542 | 'text_on' => __('Show', 'adminify'), |
| 583 | 543 | 'text_off' => __('Hide', 'adminify'), |
| 584 | 544 | 'text_width' => 80, |
| 585 | - 'title' => __('Username Change', 'adminify'), | |
| 586 | - /* translators: %s: URL to the documentation page */ | |
| 587 | - 'subtitle' => sprintf(__('Remove Comments for Media attachment Template <a href="%s">More Details</a> ', 'adminify'), esc_url('https://wpadminify.com/docs/adminify/security/change-wordpress-username')), | |
| 588 | - 'class' => 'adminify-pl-0', | |
| 589 | - 'default' => $this->get_default_field('users_security')['change_username'], | |
| 590 | - 'dependency' => ['enable_users_security', '==', 'true', 'true'] | |
| 545 | + 'title' => __('Limit Login Attempts', 'adminify'), | |
| 546 | + 'subtitle' => sprintf(__('Prevent brute force attacks by limiting the number of failed login attempts per IP address. <a href="%s">More Details</a> ', 'adminify'), esc_url('https://wpadminify.com/docs')), | |
| 547 | + 'default' => $this->get_default_field('users_security')['limit_logins'], | |
| 591 | 548 | ]; |
| 592 | 549 | |
| 593 | 550 | $users[] = array( |
| 594 | 551 | 'id' => 'users_security', |
| 595 | 552 | 'type' => 'fieldset', |
| 596 | - /* translators: %1$s: Pro upgrade badge HTML; %2$s: New badge HTML */ | |
| 597 | - 'title' => sprintf(__('Users Security %1$s %2$s', 'adminify'), Utils::upgrade_pro_badge(), Utils::new_badge()), | |
| 553 | + 'title' => __('Users Security', 'adminify'), | |
| 598 | 554 | 'subtitle' => __('Security for Users, Login/Logout etc.', 'adminify'), |
| 599 | 555 | 'fields' => $users_settings, |
| 600 | - 'class' => 'adminify-two-columns adminify-pro-fieldset adminify-pro-notice adminify-items-start', | |
| 601 | 556 | 'default' => $this->get_default_field('users_security'), |
| 602 | 557 | ); |
| 603 | 558 | } |
| 604 | 559 | |
| @@ -620,9 +575,9 @@ | ||
| 620 | 575 | [ |
| 621 | 576 | 'id' => 'security_rest_api_enable', |
| 622 | 577 | 'type' => 'switcher', |
| 623 | 578 | 'class' => 'adminify-pl-0 adminify-pt-0', |
| 624 | - 'title' => '', | |
| 579 | + 'title' => __('', 'adminify'), | |
| 625 | 580 | 'text_on' => __('Show', 'adminify'), |
| 626 | 581 | 'text_off' => __('Hide', 'adminify'), |
| 627 | 582 | 'text_width' => 80, |
| 628 | 583 | 'default' => $this->get_default_field('security_rest_api')['security_rest_api_enable'], |
| @@ -629,9 +584,9 @@ | ||
| 629 | 584 | ], |
| 630 | 585 | [ |
| 631 | 586 | 'id' => 'security_rest_api_data', |
| 632 | 587 | 'type' => 'checkbox', |
| 633 | - 'title' => '', | |
| 588 | + 'title' => __('', 'adminify'), | |
| 634 | 589 | 'class' => 'adminify-one-col', |
| 635 | 590 | 'options' => $json_api_fields_data, |
| 636 | 591 | 'default' => $this->get_default_field('security_rest_api')['security_rest_api_data'], |
| 637 | 592 | 'dependency' => ['security_rest_api_enable', '==', 'true', true], |
| @@ -673,9 +628,9 @@ | ||
| 673 | 628 | 'fields' => [ |
| 674 | 629 | [ |
| 675 | 630 | 'id' => 'post_archives_enable', |
| 676 | 631 | 'type' => 'switcher', |
| 677 | - 'title' => '', | |
| 632 | + 'title' => __('', 'adminify'), | |
| 678 | 633 | 'text_on' => __('Show', 'adminify'), |
| 679 | 634 | 'text_off' => __('Hide', 'adminify'), |
| 680 | 635 | 'text_width' => 80, |
| 681 | 636 | 'class' => 'adminify-pl-0 adminify-pt-0', |
| @@ -684,9 +639,9 @@ | ||
| 684 | 639 | [ |
| 685 | 640 | 'id' => 'post_archives_data', |
| 686 | 641 | 'type' => 'checkbox', |
| 687 | 642 | 'class' => 'adminify-one-col', |
| 688 | - 'title' => '', | |
| 643 | + 'title' => __('', 'adminify'), | |
| 689 | 644 | 'options' => $archive_fields_data, |
| 690 | 645 | 'default' => $this->get_default_field('post_archives')['post_archives_data'], |
| 691 | 646 | 'dependency' => ['post_archives_enable', '==', 'true', true], |
| 692 | 647 | ], |
| @@ -711,9 +666,8 @@ | ||
| 711 | 666 | 'id' => 'enable', |
| 712 | 667 | 'type' => 'switcher', |
| 713 | 668 | 'title' => '', |
| 714 | 669 | 'class' => 'adminify-pt-0 adminify-pl-0 adminify-col-fit', |
| 715 | - /* translators: %s: URL to the Discussion settings page */ | |
| 716 | 670 | 'label' => sprintf(__('Add your Custom Gravatar Images for Comments. Select Avatar Image from <a href="%s">Settings>Discussion>Default Avatar</a>.', 'adminify'), esc_url(admin_url('options-discussion.php'))), |
| 717 | 671 | 'text_on' => __('Yes', 'adminify'), |
| 718 | 672 | 'text_off' => __('No', 'adminify'), |
| 719 | 673 | 'text_width' => 80, |
| @@ -761,10 +715,9 @@ | ||
| 761 | 715 | $fields[] = [ |
| 762 | 716 | 'id' => 'disable_automatic_emails', |
| 763 | 717 | 'type' => 'switcher', |
| 764 | 718 | 'class' => 'adminify-pro-fieldset adminify-pro-notice', |
| 765 | - /* translators: %s: Pro upgrade badge HTML */ | |
| 766 | - 'title' => sprintf(__('Disable Automatic Updates Emails %s', 'adminify'), Utils::upgrade_pro_badge()), | |
| 719 | + 'title' => sprintf(__('Disable Automatic Updates Emails %s', 'adminify'), Utils::adminify_upgrade_pro_badge()), | |
| 767 | 720 | 'subtitle' => __('Stop getting emails about automatic updates on your WordPress site.', 'adminify'), |
| 768 | 721 | 'text_on' => __('Yes', 'adminify'), |
| 769 | 722 | 'text_off' => __('No', 'adminify'), |
| 770 | 723 | 'text_width' => 80, |
| @@ -774,10 +727,9 @@ | ||
| 774 | 727 | $fields[] = [ |
| 775 | 728 | 'id' => 'disable_language_switcher_login', |
| 776 | 729 | 'type' => 'switcher', |
| 777 | 730 | 'class' => 'adminify-pro-fieldset adminify-pro-notice', |
| 778 | - /* translators: %s: Pro upgrade badge HTML */ | |
| 779 | - 'title' => sprintf(__('Disable Login Screen Language Switcher %s', 'adminify'), Utils::upgrade_pro_badge()), | |
| 731 | + 'title' => sprintf(__('Disable Login Screen Language Switcher %s', 'adminify'), Utils::adminify_upgrade_pro_badge()), | |
| 780 | 732 | 'subtitle' => __('Hide the Language Switcher on the default WordPress login screen.', 'adminify'), |
| 781 | 733 | 'text_on' => __('Yes', 'adminify'), |
| 782 | 734 | 'text_off' => __('No', 'adminify'), |
| 783 | 735 | 'text_width' => 80, |
| @@ -802,14 +754,11 @@ | ||
| 802 | 754 | 'discussion_menu' => __('Remove Discussion Menu from "Settings>Discussion" Sub Menu', 'adminify'), |
| 803 | 755 | 'close_front' => __('Close Comments from front-end', 'adminify'), |
| 804 | 756 | 'comments_notes' => __('Remove "Your email address will not be published..." from comment form template', 'adminify'), |
| 805 | 757 | 'comments_url_field' => __('Remove website Field (URL) from comment form template', 'adminify'), |
| 806 | - /* translators: %s: Pro upgrade badge CSS class */ | |
| 807 | - 'replace_author_link' => sprintf(__('Remove Link from comment "Author Name" & replace to JavaScript? %s', 'adminify'), Utils::upgrade_pro_class()), | |
| 808 | - /* translators: %s: Pro upgrade badge CSS class */ | |
| 809 | - 'replace_comment_link' => sprintf(__('Comments Content disable auto linking, display comments links as plain text, replace Comment Links to JavaScript? %s', 'adminify'), Utils::upgrade_pro_class()), | |
| 810 | - /* translators: %s: Pro upgrade badge CSS class */ | |
| 811 | - 'hide_existing' => sprintf(__('Hide Existing Comments from Frontend? %s', 'adminify'), Utils::upgrade_pro_class()), | |
| 758 | + 'replace_author_link' => sprintf(__('Remove Link from comment "Author Name" & replace to JavaScript? %s'), Utils::adminify_upgrade_pro_class()), | |
| 759 | + 'replace_comment_link' => sprintf(__('Comments Content disable auto linking, display comments links as plain text, replace Comment Links to JavaScript? %s', 'adminify'), Utils::adminify_upgrade_pro_class()), | |
| 760 | + 'hide_existing' => sprintf(__('Hide Existing Comments from Frontend? %s', 'adminify'), Utils::adminify_upgrade_pro_class()), | |
| 812 | 761 | ]; |
| 813 | 762 | |
| 814 | 763 | // check if WP_Widget_Recent_Comments is used |
| 815 | 764 | // $recentcomments = []; |
| @@ -826,9 +775,9 @@ | ||
| 826 | 775 | 'fields' => [ |
| 827 | 776 | [ |
| 828 | 777 | 'id' => 'enable_disable_comments', |
| 829 | 778 | 'type' => 'switcher', |
| 830 | - 'title' => '', | |
| 779 | + 'title' => __('', 'adminify'), | |
| 831 | 780 | 'class' => 'adminify-pl-0 adminify-pt-0', |
| 832 | 781 | 'text_on' => __('Show', 'adminify'), |
| 833 | 782 | 'text_off' => __('Hide', 'adminify'), |
| 834 | 783 | 'text_width' => 80, |
| @@ -838,9 +787,9 @@ | ||
| 838 | 787 | 'id' => 'post_types', |
| 839 | 788 | 'type' => 'checkbox', |
| 840 | 789 | 'title' => __('for Post Types', 'adminify'), |
| 841 | 790 | 'subtitle' => __('Check for enable Post Types', 'adminify'), |
| 842 | - 'options' => 'PXLBSAdminify\Inc\Admin\Options\Productivity::get_all_post_types', | |
| 791 | + 'options' => 'WPAdminify\Inc\Admin\Options\Productivity::get_all_post_types', | |
| 843 | 792 | 'default' => $this->get_default_field('disable_comments')['post_types'], |
| 844 | 793 | 'dependency' => ['enable_disable_comments', '==', 'true', true], |
| 845 | 794 | ], |
| 846 | 795 | // [ |
| @@ -846,9 +795,9 @@ | ||
| 846 | 795 | // [ |
| 847 | 796 | // 'id' => 'disable_comments_post_types', |
| 848 | 797 | // 'type' => 'notice', |
| 849 | 798 | // 'style' => 'warning', |
| 850 | - // 'content' => Utils::upgrade_pro_notice(), | |
| 799 | + // 'content' => Utils::adminify_upgrade_pro(), | |
| 851 | 800 | // 'dependency' => [ |
| 852 | 801 | // [ 'post_types', 'not-any', 'post,page', 'true' ], |
| 853 | 802 | // [ 'post_types', '!=', '', 'true' ], |
| 854 | 803 | // ], |
| @@ -855,9 +804,9 @@ | ||
| 855 | 804 | // ], |
| 856 | 805 | [ |
| 857 | 806 | 'id' => 'apply_for', |
| 858 | 807 | 'type' => 'checkbox', |
| 859 | - 'title' => '', | |
| 808 | + 'title' => __('', 'adminify'), | |
| 860 | 809 | 'class' => 'adminify-one-col', |
| 861 | 810 | 'options' => $disable_comments_for, |
| 862 | 811 | 'default' => $this->get_default_field('disable_comments')['apply_for'], |
| 863 | 812 | 'dependency' => ['enable_disable_comments', '==', 'true', true], |
| @@ -875,23 +824,24 @@ | ||
| 875 | 824 | |
| 876 | 825 | $fields = []; |
| 877 | 826 | |
| 878 | 827 | $fields[] = [ |
| 879 | - 'id' => 'security_subheading', | |
| 828 | + 'id' => 'security_sub_heading', | |
| 880 | 829 | 'type' => 'subheading', |
| 881 | - 'content' => Utils::help_urls( | |
| 882 | - __('"WordPress" White Label Settings', 'adminify'), | |
| 883 | - 'https://wpadminify.com/docs/security/', | |
| 884 | - '', | |
| 830 | + 'content' => Utils::adminfiy_help_urls( | |
| 831 | + __('<span></span>', 'adminify'), | |
| 832 | + 'https://wpadminify.com/kb/disable-admin-notice-in-wordpress-dashboard/', | |
| 833 | + 'https://www.youtube.com/playlist?list=PLqpMw0NsHXV-EKj9Xm1DMGa6FGniHHly8', | |
| 885 | 834 | 'https://www.facebook.com/groups/jeweltheme', |
| 886 | - \PXLBSAdminify\Inc\Admin\AdminSettings::support_url() | |
| 887 | - ) | |
| 835 | + 'https://wpadminify.com/support/' | |
| 836 | + ), | |
| 888 | 837 | ]; |
| 889 | 838 | |
| 839 | + | |
| 890 | 840 | $this->security_redirect_urls( $fields ); |
| 891 | - $this->security_user_security( $fields ); | |
| 841 | + // $this->security_user_security( $fields ); | |
| 892 | 842 | $this->security_head_fields( $fields ); |
| 893 | - $this->security_feed_fields( $fields ); | |
| 843 | + $this->security_feed_fields( $fields ); | |
| 894 | 844 | $this->security_rest_api_fields( $fields ); |
| 895 | 845 | $this->security_disable_comments( $fields ); |
| 896 | 846 | $this->security_archive_fields( $fields ); |
| 897 | 847 | // $this->security_others( $fields ); |
| @@ -897,9 +847,9 @@ | ||
| 897 | 847 | // $this->security_others( $fields ); |
| 898 | 848 | |
| 899 | 849 | $this->security_custom_gravatar( $fields ); |
| 900 | 850 | |
| 901 | - $fields = apply_filters('pxlbsadminify_settings/security', $fields, $this); | |
| 851 | + $fields = apply_filters('adminify_settings/security', $fields, $this); | |
| 902 | 852 | |
| 903 | 853 | // Tweaks Section |
| 904 | 854 | \ADMINIFY::createSection( |
| 905 | 855 | $this->prefix, |