| @@ -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; |
| @@ -77,9 +77,9 @@ | ||
| 77 | 77 | 'light_dark_mode' => [ |
| 78 | 78 | 'admin_ui_mode' => 'light', |
| 79 | 79 | 'admin_ui_logo_type' => 'image_logo', |
| 80 | 80 | 'admin_ui_light_mode' => [ |
| 81 | - 'admin_ui_light_logo_text' => __('Adminify', 'adminify'), | |
| 81 | + 'admin_ui_light_logo_text' => __('WP Adminify', 'adminify'), | |
| 82 | 82 | 'admin_ui_light_logo_text_typo' => '', |
| 83 | 83 | 'admin_ui_light_logo' => [ |
| 84 | 84 | 'url' => '' |
| 85 | 85 | ], |
| @@ -90,9 +90,9 @@ | ||
| 90 | 90 | 'unit' => 'px', |
| 91 | 91 | ] |
| 92 | 92 | ], |
| 93 | 93 | 'admin_ui_dark_mode' => [ |
| 94 | - 'admin_ui_dark_logo_text' => __('Adminify', 'adminify'), | |
| 94 | + 'admin_ui_dark_logo_text' => __('WP Adminify', 'adminify'), | |
| 95 | 95 | 'admin_ui_dark_logo_text_typo' => '', |
| 96 | 96 | 'admin_ui_dark_logo' => '', |
| 97 | 97 | 'mini_admin_ui_dark_logo' => '', |
| 98 | 98 | 'dark_logo_size' => [ |
| @@ -128,14 +128,14 @@ | ||
| 128 | 128 | { |
| 129 | 129 | $fields[] = [ |
| 130 | 130 | 'id' => 'layout_mode_setting_subheading', |
| 131 | 131 | 'type' => 'subheading', |
| 132 | - 'content' => Utils::help_urls( | |
| 132 | + 'content' => Utils::adminfiy_help_urls( | |
| 133 | 133 | '<span></span>', |
| 134 | 134 | 'https://wpadminify.com/docs/adminify/customize/adminify-ui-templates', |
| 135 | 135 | 'https://www.youtube.com/watch?v=jeWdKbEHYVU', |
| 136 | 136 | 'https://www.facebook.com/groups/jeweltheme', |
| 137 | - \PXLBSAdminify\Inc\Admin\AdminSettings::support_url() | |
| 137 | + \WPAdminify\Inc\Admin\AdminSettings::support_url() | |
| 138 | 138 | ), |
| 139 | 139 | ]; |
| 140 | 140 | |
| 141 | 141 | $fields[] = [ |
| @@ -154,18 +154,18 @@ | ||
| 154 | 154 | 'id' => 'adminify_theme', |
| 155 | 155 | 'type' => 'image_select', |
| 156 | 156 | 'title' => __('Adminify UI Templates', 'adminify'), |
| 157 | 157 | 'options' => [ |
| 158 | - 'preset1' => PXLBSADMINIFY_ASSETS_IMAGE . 'presets/preset-1.png', | |
| 159 | - 'preset2' => PXLBSADMINIFY_ASSETS_IMAGE . 'presets/preset-2.png', | |
| 160 | - 'preset3' => PXLBSADMINIFY_ASSETS_IMAGE . 'presets/preset-3.png', | |
| 161 | - 'preset4' => PXLBSADMINIFY_ASSETS_IMAGE . 'presets/preset-4.png', | |
| 162 | - 'preset5' => PXLBSADMINIFY_ASSETS_IMAGE . 'presets/preset-5.png', | |
| 163 | - 'preset6' => PXLBSADMINIFY_ASSETS_IMAGE . 'presets/preset-6.png', | |
| 164 | - 'preset7' => PXLBSADMINIFY_ASSETS_IMAGE . 'presets/preset-7.png', | |
| 165 | - 'preset8' => PXLBSADMINIFY_ASSETS_IMAGE . 'presets/preset-8.png', | |
| 166 | - 'preset9' => PXLBSADMINIFY_ASSETS_IMAGE . 'presets/preset-9.png', | |
| 167 | - 'custom' => PXLBSADMINIFY_ASSETS_IMAGE . 'presets/preset-10.png', | |
| 158 | + 'preset1' => WP_ADMINIFY_ASSETS_IMAGE . 'presets/preset-1.png', | |
| 159 | + 'preset2' => WP_ADMINIFY_ASSETS_IMAGE . 'presets/preset-2.png', | |
| 160 | + 'preset3' => WP_ADMINIFY_ASSETS_IMAGE . 'presets/preset-3.png', | |
| 161 | + 'preset4' => WP_ADMINIFY_ASSETS_IMAGE . 'presets/preset-4.png', | |
| 162 | + 'preset5' => WP_ADMINIFY_ASSETS_IMAGE . 'presets/preset-5.png', | |
| 163 | + 'preset6' => WP_ADMINIFY_ASSETS_IMAGE . 'presets/preset-6.png', | |
| 164 | + 'preset7' => WP_ADMINIFY_ASSETS_IMAGE . 'presets/preset-7.png', | |
| 165 | + 'preset8' => WP_ADMINIFY_ASSETS_IMAGE . 'presets/preset-8.png', | |
| 166 | + 'preset9' => WP_ADMINIFY_ASSETS_IMAGE . 'presets/preset-9.png', | |
| 167 | + 'custom' => WP_ADMINIFY_ASSETS_IMAGE . 'presets/preset-10.png', | |
| 168 | 168 | ], |
| 169 | 169 | 'default' => $this->get_default_field('adminify_theme'), |
| 170 | 170 | 'dependency' => ['admin_ui', '==', 'true'], |
| 171 | 171 | ]; |
| @@ -174,16 +174,15 @@ | ||
| 174 | 174 | // 'id' => 'adminify_theme_custom_colors', |
| 175 | 175 | // 'title' => __(' ', 'adminify'), |
| 176 | 176 | // 'type' => 'notice', |
| 177 | 177 | // 'style' => 'warning', |
| 178 | - // 'content' => Utils::upgrade_pro_notice(), | |
| 178 | + // 'content' => Utils::adminify_upgrade_pro(), | |
| 179 | 179 | // 'dependency' => [ 'adminify_theme|adminify_theme', '!=|!=', 'preset1|preset2', 'any'], |
| 180 | 180 | |
| 181 | 181 | 'id' => 'adminify_theme_custom_colors', |
| 182 | 182 | 'type' => 'color_group', |
| 183 | 183 | 'class' => 'adminify-pro-fieldset', |
| 184 | - /* translators: %s: pro upgrade badge HTML */ | |
| 185 | - 'title' => sprintf(__('Custom Color Preset %s', 'adminify'), Utils::upgrade_pro_badge()), | |
| 184 | + 'title' => sprintf(__('Custom Color Preset %s', 'adminify'), Utils::adminify_upgrade_pro_badge()), | |
| 186 | 185 | 'subtitle' => __('Custom Template Color Presets', 'adminify'), |
| 187 | 186 | 'options' => [ |
| 188 | 187 | '--adminify-preset-background' => __('Body BG', 'adminify'), |
| 189 | 188 | '--adminify-primary' => __('Primary Color', 'adminify'), |
| @@ -204,9 +203,9 @@ | ||
| 204 | 203 | 'id' => 'admin_glass_effect', |
| 205 | 204 | 'title' => __('Glass Effect', 'adminify'), |
| 206 | 205 | 'type' => 'notice', |
| 207 | 206 | 'style' => 'warning', |
| 208 | - 'content' => Utils::upgrade_pro_notice(), | |
| 207 | + 'content' => Utils::adminify_upgrade_pro(), | |
| 209 | 208 | ]; |
| 210 | 209 | } |
| 211 | 210 | |
| 212 | 211 | // Admin Bar Settings |
| @@ -254,10 +253,9 @@ | ||
| 254 | 253 | $fields[] = [ |
| 255 | 254 | 'id' => 'body_fields', |
| 256 | 255 | 'type' => 'fieldset', |
| 257 | 256 | 'class' => 'adminify-nopadding', |
| 258 | - /* translators: %s: pro upgrade badge HTML */ | |
| 259 | - 'title' => sprintf(__('Custom Background %s', 'adminify'), Utils::upgrade_pro_badge()), | |
| 257 | + 'title' => sprintf(__('Custom Background %s', 'adminify'), Utils::adminify_upgrade_pro_badge()), | |
| 260 | 258 | 'subtitle' => __('Choose to Enable Custom Background for your Dashboard.', 'adminify'), |
| 261 | 259 | 'fields' => $background_settings, |
| 262 | 260 | 'dependency' => ['admin_ui', '==', 'true', 'true'], |
| 263 | 261 | ]; |
| @@ -265,10 +263,9 @@ | ||
| 265 | 263 | $fields[] = [ |
| 266 | 264 | 'id' => 'admin_general_google_font', |
| 267 | 265 | 'type' => 'typography', |
| 268 | 266 | 'class' => 'adminify-pro-fieldset adminify-pro-notice adminify-pro-pointer', |
| 269 | - /* translators: %s: pro upgrade badge HTML */ | |
| 270 | - 'title' => sprintf(__('Body Font %s', 'adminify'), Utils::upgrade_pro_badge()), | |
| 267 | + 'title' => sprintf(__('Body Font %s', 'adminify'), Utils::adminify_upgrade_pro_badge()), | |
| 271 | 268 | 'line_height' => false, |
| 272 | 269 | 'text_align' => false, |
| 273 | 270 | 'text_transform' => false, |
| 274 | 271 | 'subset' => false, |
| @@ -282,10 +279,9 @@ | ||
| 282 | 279 | $fields[] = [ |
| 283 | 280 | 'id' => 'admin_favicon_logo', |
| 284 | 281 | 'type' => 'media', |
| 285 | 282 | 'class' => 'adminify-pro-fieldset adminify-pro-notice adminify-pro-pointer', |
| 286 | - /* translators: %s: pro upgrade badge HTML */ | |
| 287 | - 'title' => sprintf(__('Admin Favicon %s', 'adminify'), Utils::upgrade_pro_badge()), | |
| 283 | + 'title' => sprintf(__('Admin Favicon %s', 'adminify'), Utils::adminify_upgrade_pro_badge()), | |
| 288 | 284 | 'subtitle' => __('Admin Area Favicon Icon', 'adminify'), |
| 289 | 285 | 'library' => 'image', |
| 290 | 286 | 'preview_size' => 'thumbnail', |
| 291 | 287 | 'button_title' => __('Add Favicon', 'adminify'), |
| @@ -292,25 +288,21 @@ | ||
| 292 | 288 | 'remove_title' => __('Remove Favicon', 'adminify'), |
| 293 | 289 | 'default' => $this->get_default_field('admin_favicon_logo'), |
| 294 | 290 | ]; |
| 295 | 291 | |
| 296 | - // Gutenberg Editor Logo. WordPress 7.1 dropped the class this hooks | |
| 297 | - // onto, so the field is only offered where it can still do something. | |
| 298 | - if ( Utils::is_wp_below_7_1() ) { | |
| 299 | - $fields[] = [ | |
| 300 | - 'id' => 'gutenberg_editor_logo', | |
| 301 | - 'type' => 'media', | |
| 302 | - /* translators: %s: pro upgrade badge HTML */ | |
| 303 | - 'title' => sprintf(__('Gutenberg Editor Logo %s', 'adminify'), Utils::upgrade_pro_badge()), | |
| 304 | - 'class' => 'adminify-pro-fieldset adminify-pro-notice adminify-pro-pointer', | |
| 305 | - 'subtitle' => __('Replace Gutenberg Post/Page WordPress Logo', 'adminify'), | |
| 306 | - 'library' => 'image', | |
| 307 | - 'preview_size' => 'thumbnail', | |
| 308 | - 'button_title' => __('Add Editor Logo', 'adminify'), | |
| 309 | - 'remove_title' => __('Remove Editor Logo', 'adminify'), | |
| 310 | - 'default' => $this->get_default_field('gutenberg_editor_logo'), | |
| 311 | - ]; | |
| 312 | - } | |
| 292 | + // Gutenberg Editor Logo | |
| 293 | + $fields[] = [ | |
| 294 | + 'id' => 'gutenberg_editor_logo', | |
| 295 | + 'type' => 'media', | |
| 296 | + 'title' => sprintf(__('Gutenberg Editor Logo %s', 'adminify'), Utils::adminify_upgrade_pro_badge()), | |
| 297 | + 'class' => 'adminify-pro-fieldset adminify-pro-notice adminify-pro-pointer', | |
| 298 | + 'subtitle' => __('Replace Gutenberg Post/Page WordPress Logo', 'adminify'), | |
| 299 | + 'library' => 'image', | |
| 300 | + 'preview_size' => 'thumbnail', | |
| 301 | + 'button_title' => __('Add Editor Logo', 'adminify'), | |
| 302 | + 'remove_title' => __('Remove Editor Logo', 'adminify'), | |
| 303 | + 'default' => $this->get_default_field('gutenberg_editor_logo'), | |
| 304 | + ]; | |
| 313 | 305 | |
| 314 | 306 | } |
| 315 | 307 | |
| 316 | 308 | |
| @@ -319,9 +311,9 @@ | ||
| 319 | 311 | { |
| 320 | 312 | $fields[] = [ |
| 321 | 313 | 'id' => 'adminify_custom_bg', |
| 322 | 314 | 'type' => 'switcher', |
| 323 | - 'title' => '', | |
| 315 | + 'title' => __('', 'adminify'), | |
| 324 | 316 | 'class' => '!adminify-flex adminify-pt-0 adminify-pl-0 adminify-pro-feature', |
| 325 | 317 | 'subtitle' => __('Choose to Enable Custom Background for your Dashboard.', 'adminify'), |
| 326 | 318 | 'text_on' => __('Show', 'adminify'), |
| 327 | 319 | 'text_off' => __('Hide', 'adminify'), |
| @@ -332,9 +324,9 @@ | ||
| 332 | 324 | |
| 333 | 325 | $fields[] = [ |
| 334 | 326 | 'id' => 'admin_general_bg', |
| 335 | 327 | 'type' => 'button_set', |
| 336 | - 'class' => Utils::upgrade_pro_notice_class(), | |
| 328 | + 'class' => Utils::upgrade_pro_class(), | |
| 337 | 329 | 'title' => 'Background Type', |
| 338 | 330 | 'options' => [ |
| 339 | 331 | // 'color' => __('Color', 'adminify'), |
| 340 | 332 | 'gradient' => __('Gradient', 'adminify'), |
| @@ -357,9 +349,9 @@ | ||
| 357 | 349 | // Gradient BG |
| 358 | 350 | $fields[] = [ |
| 359 | 351 | 'id' => 'admin_general_bg_gradient', |
| 360 | 352 | 'type' => 'background', |
| 361 | - 'class' => Utils::upgrade_pro_notice_class(), | |
| 353 | + 'class' => Utils::upgrade_pro_class(), | |
| 362 | 354 | 'title' => __('Gradient Color', 'adminify'), |
| 363 | 355 | 'background_color' => true, |
| 364 | 356 | 'background_image' => false, |
| 365 | 357 | 'background_position' => false, |
| @@ -377,9 +369,9 @@ | ||
| 377 | 369 | // Image |
| 378 | 370 | $fields[] = [ |
| 379 | 371 | 'id' => 'admin_general_bg_image', |
| 380 | 372 | 'type' => 'background', |
| 381 | - 'class' => Utils::upgrade_pro_notice_class() . ' adminify-pro-pointer', | |
| 373 | + 'class' => Utils::upgrade_pro_class() . ' adminify-pro-pointer', | |
| 382 | 374 | 'title' => __('Background Image', 'adminify'), |
| 383 | 375 | 'background_color' => false, |
| 384 | 376 | 'background_image' => true, |
| 385 | 377 | 'background_position' => true, |
| @@ -461,9 +453,9 @@ | ||
| 461 | 453 | ]; |
| 462 | 454 | |
| 463 | 455 | $dark_light_data[] = [ |
| 464 | 456 | 'id' => 'admin_ui_light_mode', |
| 465 | - 'title' => ' ', | |
| 457 | + 'title' => __(' ', 'adminify'), | |
| 466 | 458 | 'class' => 'adminify-one-col adminify-pl-0', |
| 467 | 459 | 'type' => 'fieldset', |
| 468 | 460 | 'fields' => [ |
| 469 | 461 | [ |
| @@ -528,9 +520,9 @@ | ||
| 528 | 520 | |
| 529 | 521 | $dark_light_data[] = [ |
| 530 | 522 | 'id' => 'admin_ui_dark_mode', |
| 531 | 523 | 'type' => 'fieldset', |
| 532 | - 'title' => ' ', | |
| 524 | + 'title' => __(' ', 'adminify'), | |
| 533 | 525 | 'class' => 'adminify-one-col adminify-pl-0', |
| 534 | 526 | 'fields' => [ |
| 535 | 527 | [ |
| 536 | 528 | 'id' => 'admin_ui_dark_logo_text', |
| @@ -589,10 +581,9 @@ | ||
| 589 | 581 | ], |
| 590 | 582 | |
| 591 | 583 | [ |
| 592 | 584 | 'id' => 'schedule_dark_mode', |
| 593 | - /* translators: %s: pro upgrade badge HTML */ | |
| 594 | - 'title' => sprintf(__('Schedule Dark Mode %s', 'adminify'), Utils::upgrade_pro_badge()), | |
| 585 | + 'title' => sprintf(__('Schedule Dark Mode %s', 'adminify'), Utils::adminify_upgrade_pro_badge()), | |
| 595 | 586 | 'type' => 'fieldset', |
| 596 | 587 | 'class' => 'adminify-mt-10', |
| 597 | 588 | 'fields' => [ |
| 598 | 589 | [ |
| @@ -607,9 +598,9 @@ | ||
| 607 | 598 | [ |
| 608 | 599 | 'id' => 'schedule_dark_mode_type', |
| 609 | 600 | 'title' => __('Schedule Type', 'adminify'), |
| 610 | 601 | 'type' => 'button_set', |
| 611 | - 'class' => Utils::upgrade_pro_notice_class(), | |
| 602 | + 'class' => Utils::upgrade_pro_class(), | |
| 612 | 603 | 'options' => [ |
| 613 | 604 | 'system' => __('System', 'adminify'), |
| 614 | 605 | 'custom' => __('Custom', 'adminify'), |
| 615 | 606 | ], |
| @@ -618,9 +609,9 @@ | ||
| 618 | 609 | ], |
| 619 | 610 | [ |
| 620 | 611 | 'id' => 'schedule_dark_mode_start_time', |
| 621 | 612 | 'type' => 'datetime', |
| 622 | - 'class' => Utils::upgrade_pro_notice_class() . ' adminify-pro-pointer', | |
| 613 | + 'class' => Utils::upgrade_pro_class() . ' adminify-pro-pointer', | |
| 623 | 614 | 'title' => __('Start Time', 'adminify'), |
| 624 | 615 | 'settings' => [ |
| 625 | 616 | 'noCalendar' => true, |
| 626 | 617 | 'enableTime' => true, |
| @@ -637,9 +628,9 @@ | ||
| 637 | 628 | ], |
| 638 | 629 | [ |
| 639 | 630 | 'id' => 'schedule_dark_mode_end_time', |
| 640 | 631 | 'type' => 'datetime', |
| 641 | - 'class' => Utils::upgrade_pro_notice_class() . ' adminify-pro-pointer', | |
| 632 | + 'class' => Utils::upgrade_pro_class() . ' adminify-pro-pointer', | |
| 642 | 633 | 'title' => __('End Time', 'adminify'), |
| 643 | 634 | 'settings' => [ |
| 644 | 635 | 'noCalendar' => true, |
| 645 | 636 | 'enableTime' => true, |
| @@ -684,10 +675,9 @@ | ||
| 684 | 675 | $fields[] = [ |
| 685 | 676 | 'id' => 'post_status_bg_colors', |
| 686 | 677 | 'type' => 'color_group', |
| 687 | 678 | 'class' => 'adminify-pro-fieldset', |
| 688 | - /* translators: %s: pro upgrade badge HTML */ | |
| 689 | - 'title' => sprintf(__('Post Status Background Colors %s', 'adminify'), Utils::upgrade_pro_badge()), | |
| 679 | + 'title' => sprintf(__('Post Status Background Colors %s', 'adminify'), Utils::adminify_upgrade_pro_badge()), | |
| 690 | 680 | 'subtitle' => __('Background Color by Post Status type', 'adminify'), |
| 691 | 681 | 'options' => [ |
| 692 | 682 | 'publish' => __('Publish BG Color', 'adminify'), |
| 693 | 683 | 'pending' => __('Pending BG Color', 'adminify'), |
| @@ -725,11 +715,11 @@ | ||
| 725 | 715 | $this->layout_mode_setting_fields($fields); |
| 726 | 716 | $this->admin_bar_settings($fields); |
| 727 | 717 | // $this->gutenberg_editor_customization($fields); |
| 728 | 718 | |
| 729 | - $fields = apply_filters('pxlbsadminify_settings/customize', $fields, $this); | |
| 719 | + $fields = apply_filters('adminify_settings/customize', $fields, $this); | |
| 730 | 720 | $this->post_status_bg_colors($fields); |
| 731 | - $fields = apply_filters('pxlbsadminify_settings/post_status', $fields, $this); | |
| 721 | + $fields = apply_filters('adminify_settings/post_status', $fields, $this); | |
| 732 | 722 | |
| 733 | 723 | // Admin UI Section |
| 734 | 724 | \ADMINIFY::createSection( |
| 735 | 725 | $this->prefix, |