| @@ -1,12 +1,11 @@ | ||
| 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\AdminSettings; | |
| 7 | +use WPAdminify\Inc\Admin\AdminSettingsModel; | |
| 9 | 8 | |
| 10 | 9 | if ( ! defined( 'ABSPATH' ) ) { |
| 11 | 10 | die; |
| 12 | 11 | } // Cannot access directly. |
| @@ -24,10 +23,14 @@ | ||
| 24 | 23 | 'wordpress' => [ |
| 25 | 24 | 'admin_bar_cleanup' => [], |
| 26 | 25 | 'remove_howdy_msg' => false, |
| 27 | 26 | 'change_howdy_text' => __('Howdy', 'adminify'), |
| 28 | - 'show_footer_credit' => false, | |
| 29 | - 'footer_text' => AdminFooterText::get_default_footer_credit(), | |
| 27 | + 'footer_text' => sprintf( | |
| 28 | + __('<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'), | |
| 29 | + esc_url('https://wpadminify.com/'), | |
| 30 | + \WPAdminify\Inc\Admin\AdminSettings::get_pro_label(), | |
| 31 | + esc_url('https://wordpress.org/') | |
| 32 | + ), | |
| 30 | 33 | 'admin_footer' => [ |
| 31 | 34 | 'ip_address', |
| 32 | 35 | 'php_version', |
| 33 | 36 | 'wp_version', |
| @@ -38,12 +41,12 @@ | ||
| 38 | 41 | ], |
| 39 | 42 | 'adminify' => [ |
| 40 | 43 | 'plugin_logo' => [], |
| 41 | 44 | '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'), | |
| 45 | + 'plugin_name' => \WPAdminify\Inc\Admin\AdminSettings::get_pro_label(), | |
| 46 | + '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 | 47 | 'author_name' => 'Jewel Theme', |
| 45 | - 'menu_label' => \PXLBSAdminify\Inc\Admin\AdminSettings::get_pro_label(), | |
| 48 | + 'menu_label' => \WPAdminify\Inc\Admin\AdminSettings::get_pro_label(), | |
| 46 | 49 | 'menu_icon' => [], |
| 47 | 50 | 'plugin_url' => 'https://wpadminify.com', |
| 48 | 51 | 'row_links' => false, |
| 49 | 52 | 'remove_action_links' => false, |
| @@ -53,9 +56,9 @@ | ||
| 53 | 56 | ] |
| 54 | 57 | ]; |
| 55 | 58 | } |
| 56 | 59 | |
| 57 | - public function pxlbsadminify_wordpress_white_label_fields(&$white_label) | |
| 60 | + public function jltwp_wordpress_white_label_fields(&$white_label) | |
| 58 | 61 | { |
| 59 | 62 | $admin_bar_items = [ |
| 60 | 63 | // 'menu_toggle' => __('Menu Toggle', 'adminify'), |
| 61 | 64 | 'wp_logo' => __('WordPress Logo', 'adminify'), |
| @@ -60,12 +63,10 @@ | ||
| 60 | 63 | // 'menu_toggle' => __('Menu Toggle', 'adminify'), |
| 61 | 64 | 'wp_logo' => __('WordPress Logo', 'adminify'), |
| 62 | 65 | 'site_name' => __('Site Name', 'adminify'), |
| 63 | 66 | '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()), | |
| 67 | + 'updates' => sprintf(__('Updates %s', 'adminify'), Utils::adminify_upgrade_pro_class()), | |
| 68 | + 'new_content' => sprintf(__('"New" Button %s', 'adminify'), Utils::adminify_upgrade_pro_class()), | |
| 68 | 69 | ]; |
| 69 | 70 | $admin_footer_items = [ |
| 70 | 71 | 'ip_address' => __('Show IP Address', 'adminify'), |
| 71 | 72 | 'php_version' => __('Show PHP Version', 'adminify'), |
| @@ -77,14 +78,14 @@ | ||
| 77 | 78 | |
| 78 | 79 | $white_label[] = [ |
| 79 | 80 | 'id' => 'white_label_subheading', |
| 80 | 81 | 'type' => 'subheading', |
| 81 | - 'content' => Utils::help_urls( | |
| 82 | + 'content' => Utils::adminfiy_help_urls( | |
| 82 | 83 | __('"WordPress" White Label Settings', 'adminify'), |
| 83 | 84 | 'https://wpadminify.com/docs/adminify/white-label/wordpress-white-label-features', |
| 84 | 85 | 'https://www.youtube.com/watch?v=zDK_MwIcTpc', |
| 85 | 86 | 'https://www.facebook.com/groups/jeweltheme', |
| 86 | - \PXLBSAdminify\Inc\Admin\AdminSettings::support_url() | |
| 87 | + \WPAdminify\Inc\Admin\AdminSettings::support_url() | |
| 87 | 88 | ) |
| 88 | 89 | ]; |
| 89 | 90 | |
| 90 | 91 | |
| @@ -130,18 +131,8 @@ | ||
| 130 | 131 | 'options' => $admin_footer_items, |
| 131 | 132 | 'default' => $this->get_default_field('white_label')['wordpress']['admin_footer'], |
| 132 | 133 | ]; |
| 133 | 134 | $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 | 135 | 'id' => 'footer_text', |
| 145 | 136 | 'type' => 'wp_editor', |
| 146 | 137 | 'title' => __( 'Admin Footer Text', 'adminify' ), |
| 147 | 138 | 'height' => '100px', |
| @@ -148,16 +139,15 @@ | ||
| 148 | 139 | 'media_buttons' => false, |
| 149 | 140 | 'tinymce' => false, |
| 150 | 141 | 'subtitle' => 'Left Side WordPress Admin Footer Text ', |
| 151 | 142 | 'default' => $this->get_default_field( 'white_label')['wordpress']['footer_text' ], |
| 152 | - 'dependency' => ['show_footer_credit', '==', 'true', 'true'], | |
| 153 | 143 | ]; |
| 154 | 144 | |
| 155 | - $white_label = apply_filters('pxlbsadminify_settings/wp_white_label', $white_label, $this); | |
| 145 | + $white_label = apply_filters('adminify_settings/wp_white_label', $white_label, $this); | |
| 156 | 146 | } |
| 157 | 147 | |
| 158 | - public static function pxlbsadminify_white_label_options(){ | |
| 159 | - $adminify_options = get_option('pxlbsadminify_settings'); | |
| 148 | + public static function jltwp_white_label_options(){ | |
| 149 | + $adminify_options = get_option('_wpadminify'); | |
| 160 | 150 | if( isset($adminify_options['white_label']) && !empty($adminify_options['white_label']) ){ |
| 161 | 151 | return $adminify_options['white_label']; |
| 162 | 152 | }else{ |
| 163 | 153 | return []; |
| @@ -169,21 +159,21 @@ | ||
| 169 | 159 | * @param [type] $white_label |
| 170 | 160 | * |
| 171 | 161 | * @return void |
| 172 | 162 | */ |
| 173 | - public function pxlbsadminify_white_label_fields( &$white_label ) { | |
| 163 | + public function jltwp_white_label_fields( &$white_label ) { | |
| 174 | 164 | |
| 175 | 165 | |
| 176 | 166 | $wp_white_label = []; |
| 177 | 167 | $adminify_white_label = []; |
| 178 | 168 | |
| 179 | - $this->pxlbsadminify_wordpress_white_label_fields($wp_white_label); | |
| 169 | + $this->jltwp_wordpress_white_label_fields($wp_white_label); | |
| 180 | 170 | |
| 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'] : ''; | |
| 171 | + $jltwp_white_label_options = self::jltwp_white_label_options(); | |
| 172 | + $adminify_white_label_plugin_option_enabled = !empty($jltwp_white_label_options['plugin_option']) ? $jltwp_white_label_options['plugin_option'] : ''; | |
| 183 | 173 | |
| 184 | 174 | if(empty($adminify_white_label_plugin_option_enabled)){ |
| 185 | - $this->pxlbsadminify_adminify_white_label_fields($adminify_white_label); | |
| 175 | + $this->jltwp_adminify_white_label_fields($adminify_white_label); | |
| 186 | 176 | } |
| 187 | 177 | |
| 188 | 178 | $white_label[] = [ |
| 189 | 179 | 'id' => 'white_label', |
| @@ -213,9 +203,9 @@ | ||
| 213 | 203 | * @param [type] $white_label |
| 214 | 204 | * |
| 215 | 205 | * @return void |
| 216 | 206 | */ |
| 217 | - public function pxlbsadminify_adminify_white_label_fields( &$adminify_whl_fields ) { | |
| 207 | + public function jltwp_adminify_white_label_fields( &$adminify_whl_fields ) { | |
| 218 | 208 | |
| 219 | 209 | $adminify_white_label_class = 'adminify-white-label adminify-pro-feature adminify-pro-notice'; |
| 220 | 210 | |
| 221 | 211 | $adminify_whl_fields[] = [ |
| @@ -221,15 +211,14 @@ | ||
| 221 | 211 | $adminify_whl_fields[] = [ |
| 222 | 212 | 'id' => 'adminify_whl_sub_heading', |
| 223 | 213 | 'type' => 'subheading', |
| 224 | 214 | '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>', | |
| 215 | + 'content' => Utils::adminfiy_help_urls( | |
| 216 | + sprintf(__('<span>"WP Adminify" Branding %s</span>', 'adminify'), Utils::adminify_upgrade_pro_badge('Agency or Higher Plan Only')), | |
| 228 | 217 | 'https://wpadminify.com/docs/adminify/white-label/rebrand-wp-adminify-plugin', |
| 229 | 218 | 'https://www.youtube.com/watch?v=zDK_MwIcTpc', |
| 230 | 219 | 'https://www.facebook.com/groups/jeweltheme', |
| 231 | - \PXLBSAdminify\Inc\Admin\AdminSettings::support_url() | |
| 220 | + \WPAdminify\Inc\Admin\AdminSettings::support_url() | |
| 232 | 221 | ), |
| 233 | 222 | 'dependency' => ['plugin_option', '==', 'false', 'true'], |
| 234 | 223 | ]; |
| 235 | 224 | $adminify_whl_fields[] = [ |
| @@ -347,13 +336,13 @@ | ||
| 347 | 336 | $adminify_whl_fields[] = [ |
| 348 | 337 | 'id' => 'plugin_option', |
| 349 | 338 | 'type' => 'checkbox', |
| 350 | 339 | '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'), | |
| 340 | + 'label' => __('Force Disable White Label (WP Adminify): When enabled, the White Label settings will be completely hidden. To access them again, you\'ll need to deactivate and reactivate WP Adminify Plugin.', 'adminify'), | |
| 352 | 341 | 'default' => $this->get_default_field('white_label')['adminify']['plugin_option'], |
| 353 | 342 | ]; |
| 354 | 343 | |
| 355 | - $adminify_whl_fields = apply_filters('pxlbsadminify_settings/adminify_white_label', $adminify_whl_fields, $this); | |
| 344 | + $adminify_whl_fields = apply_filters('adminify_settings/adminify_white_label', $adminify_whl_fields, $this); | |
| 356 | 345 | } |
| 357 | 346 | |
| 358 | 347 | |
| 359 | 348 | /* |
| @@ -364,9 +353,9 @@ | ||
| 364 | 353 | return; |
| 365 | 354 | } |
| 366 | 355 | |
| 367 | 356 | $fields = []; |
| 368 | - $this->pxlbsadminify_white_label_fields($fields); | |
| 357 | + $this->jltwp_white_label_fields($fields); | |
| 369 | 358 | |
| 370 | 359 | \ADMINIFY::createSection( |
| 371 | 360 | $this->prefix, |
| 372 | 361 | [ |