PluginProbe
Adminify – White Label, Admin Menu Editor, Login Customizer / 3.2.1
Adminify – White Label, Admin Menu Editor, Login Customizer v3.2.1
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
adminify / Inc / Classes / Wizard / Adminify_Setup_Wizard.php

Adminify_Setup_Wizard.php in Adminify – White Label, Admin Menu Editor, Login Customizer 3.2.1, at Inc/Classes/Wizard/Adminify_Setup_Wizard.php

1,906 lines 58.9 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace WPAdminify\Inc\Classes\Wizard;
4
5 use WPAdminify\Inc\Admin\AdminSettings ;
6 use WPAdminify\Inc\Utils ;
7 // no direct access allowed
8 if ( !defined( 'ABSPATH' ) ) {
9 exit;
10 }
11 class Adminify_Setup_Wizard
12 {
13 private $step = '' ;
14 private $steps = array() ;
15 public function __construct()
16 {
17
18 if ( current_user_can( 'manage_options' ) && current_user_can( 'administrator' ) ) {
19 $this->options = (array) AdminSettings::get_instance()->get();
20 $this->jltwp_adminify_setup_wizard();
21 add_action( 'wp_ajax_wpadminify_save_wizard_data', [ $this, 'wpadminify_save_wizard_data' ] );
22 }
23
24 }
25
26 public function validate_before_save( $settings )
27 {
28 // Customize
29 $settings['admin_bar_mode'] = ( wp_validate_boolean( $settings['admin_bar_mode'] ) ? '' : 'dark' );
30 // Admin Bar
31 if ( empty($settings['admin_bar_settings']['admin_bar_position']) ) {
32 $settings['admin_bar_settings']['admin_bar_position'] = 'top';
33 }
34 foreach ( $settings as $key => $setting ) {
35 $settings[$key] = $this->maybe_convert_to_boolean( $setting );
36 }
37 return $settings;
38 }
39
40 public function maybe_convert_to_boolean( &$setting )
41 {
42
43 if ( gettype( $setting ) == 'string' && ($setting === 'true' || $setting === 'false') ) {
44 $setting = wp_validate_boolean( $setting );
45 } elseif ( gettype( $setting ) == 'array' ) {
46 foreach ( $setting as $key => $_setting ) {
47 $setting[$key] = $this->maybe_convert_to_boolean( $_setting );
48 }
49 }
50
51 return $setting;
52 }
53
54 /**
55 * Recursive sanitation for an array
56 * This will use later with time
57 */
58 function array_recursive_sanitize_text_field( $array )
59 {
60 foreach ( $array as $key => &$value ) {
61
62 if ( is_array( $value ) ) {
63 $value = recursive_sanitize_text_field( $value );
64 } else {
65 $value = sanitize_text_field( $value );
66 }
67
68 }
69 return $array;
70 }
71
72 public function wpadminify_save_wizard_data()
73 {
74 check_ajax_referer( 'jltwp_adminify_sw' );
75 $this->setup_steps();
76 if ( !empty($_POST['active_step']) ) {
77 $this->step = sanitize_text_field( wp_unslash( $_POST['active_step'] ) );
78 }
79 $settings = ( empty($_POST['settings']) ? [] : (array) wp_kses_post_deep( wp_unslash( $_POST['settings'] ) ) );
80 $settings = $this->validate_before_save( $settings );
81 update_option( '_wpadminify', $settings );
82 wp_send_json_success( [
83 'redirect' => $this->get_next_step_link(),
84 ] );
85 }
86
87 public function load_scripts()
88 {
89 // Register
90 // wp_register_script('wp-adminify-vue-manifest', WP_ADMINIFY_ASSETS . 'admin/js/manifest.js', [], WP_ADMINIFY_VER, true);
91 // wp_register_script('wp-adminify-vue-vendors', WP_ADMINIFY_ASSETS . 'admin/js/vendor' . Utils::assets_ext('.js'), ['wp-adminify-vue-manifest'], WP_ADMINIFY_VER, true);
92 wp_register_style( 'wp-adminify-sw-setup', WP_ADMINIFY_ASSETS . 'css/setup.css', [ 'dashicons', 'install' ] );
93 wp_register_script(
94 'wp-adminify-sw-setup',
95 WP_ADMINIFY_ASSETS . 'admin/js/wp-adminify--setup-wizard' . Utils::assets_ext( '.js' ),
96 [ 'jquery', 'wp-adminify-vue-vendors' ],
97 WP_ADMINIFY_VER,
98 true
99 );
100 // Media Uploader
101 wp_enqueue_media();
102 // Load
103 wp_enqueue_style( 'wp-adminify-sw-setup' );
104 wp_enqueue_script( 'wp-adminify-sw-setup' );
105 // Localize Script
106 $adminify_data = [
107 'settings' => $this->get_validated_settings(),
108 'wpnonce' => wp_create_nonce( 'jltwp_adminify_sw' ),
109 ];
110 wp_localize_script( 'wp-adminify-sw-setup', 'adminify_setup_wizard_data', $adminify_data );
111 }
112
113 public function get_validated_settings()
114 {
115 // Module
116 $boolean_settings = [
117 'admin_ui',
118 'folders',
119 'login_customizer',
120 'admin_columns',
121 'menu_editor',
122 'dashboard_widgets',
123 'pagespeed_insights',
124 'custom_css_js',
125 'quick_menu',
126 'menu_duplicator',
127 'notification_bar',
128 'activity_logs',
129 'post_duplicator',
130 'admin_pages',
131 'sidebar_generator',
132 'post_types_order',
133 'server_info',
134 'disable_comments'
135 ];
136 foreach ( $boolean_settings as $b_setting ) {
137 $this->options[$b_setting] = wp_validate_boolean( $this->options[$b_setting] );
138 }
139 // Customize
140 $this->options['admin_bar_mode'] = $this->options['admin_bar_mode'] == 'light';
141 // Admin Bar
142 $admin_bar_settings = [
143 'admin_bar_menu',
144 'admin_bar_search',
145 'admin_bar_comments',
146 'admin_bar_view_website',
147 'admin_bar_dark_light_btn'
148 ];
149 foreach ( $admin_bar_settings as $admin_bar_setting ) {
150 if ( isset( $this->options['admin_bar_settings'][$admin_bar_setting] ) ) {
151 $this->options['admin_bar_settings'][$admin_bar_setting] = wp_validate_boolean( $this->options['admin_bar_settings'][$admin_bar_setting] );
152 }
153 }
154 if ( empty($this->options['admin_bar_settings']['admin_bar_position']) ) {
155 $this->options['admin_bar_settings']['admin_bar_position'] = 'top';
156 }
157 // Tweaks
158 $tweaks = [
159 'generator_wp_version',
160 'remove_version_strings',
161 'remove_dashicons',
162 'remove_shortlink',
163 'remove_canonical',
164 'remove_emoji',
165 'disable_xmlrpc',
166 'remove_feed',
167 'remove_pingback',
168 'remove_powered',
169 'gravatar_query_strings'
170 ];
171 foreach ( $tweaks as $tweak ) {
172 $this->options[$tweak] = wp_validate_boolean( $this->options[$tweak] );
173 }
174 $admin_notices = [
175 'hide_notices',
176 'remove_welcome_panel',
177 'remove_php_update_required_nag',
178 'remove_try_gutenberg_panel',
179 'core_update_notice',
180 'plugin_update_notice',
181 'theme_update_notice'
182 ];
183 foreach ( $admin_notices as $admin_notice ) {
184 $this->options[$admin_notice] = wp_validate_boolean( $this->options[$admin_notice] );
185 }
186 return $this->options;
187 }
188
189 public function setup_steps()
190 {
191 $this->steps = [
192 'intro' => [
193 'name' => esc_html__( 'Introduction', 'adminify' ),
194 'view' => [ $this, 'jltwp_adminify_step_introduction' ],
195 ],
196 'module' => [
197 'name' => esc_html__( 'Module', 'adminify' ),
198 'view' => [ $this, 'setup_step_modules' ],
199 ],
200 'customize' => [
201 'name' => esc_html__( 'Customize', 'adminify' ),
202 'view' => [ $this, 'setup_step_customize' ],
203 ],
204 'menu' => [
205 'name' => esc_html__( 'Menu', 'adminify' ),
206 'view' => [ $this, 'setup_step_menu' ],
207 ],
208 'admin_bar' => [
209 'name' => esc_html__( 'Admin Bar', 'adminify' ),
210 'view' => [ $this, 'setup_step_admin_bar' ],
211 ],
212 'tweaks' => [
213 'name' => esc_html__( 'Tweaks', 'adminify' ),
214 'view' => [ $this, 'setup_step_tweaks' ],
215 ],
216 'admin_notices' => [
217 'name' => esc_html__( 'Admin Notices', 'adminify' ),
218 'view' => [ $this, 'setup_step_admin_notices' ],
219 ],
220 'next_steps' => [
221 'name' => esc_html__( 'Ready!', 'adminify' ),
222 'view' => [ $this, 'setup_step_ready' ],
223 ],
224 ];
225 $this->step = ( isset( $_GET['step'] ) ? sanitize_key( $_GET['step'] ) : current( array_keys( $this->steps ) ) );
226 }
227
228 public function jltwp_adminify_setup_wizard()
229 {
230 if ( empty($_GET['page']) || 'wp-adminify-setup-wizard' !== $_GET['page'] ) {
231 return;
232 }
233 $this->setup_steps();
234 $this->load_scripts();
235 $this->setup_wizard_header();
236 $this->setup_wizard_steps();
237 $this->setup_wizard_content();
238 $this->setup_wizard_footer();
239 exit;
240 }
241
242 function jltwp_adminify_get_content_info(
243 &$site_title,
244 &$tagline,
245 &$admin_email,
246 &$defa_cat,
247 &$set_permalink,
248 &$users_can_register,
249 &$wpsw_date_format,
250 &$wpsw_time_format
251 )
252 {
253 $site_title = get_bloginfo( 'name' );
254 $tagline = get_bloginfo( 'description' );
255 $admin_email = get_bloginfo( 'admin_email' );
256 $default_category = get_option( 'default_category' );
257 $defa_cat = get_cat_name( $default_category );
258 $set_permalink = get_option( 'permalink_structure' );
259 $users_can_register = get_option( 'users_can_register' );
260 $wpsw_date_format = get_option( 'date_format' );
261 $wpsw_time_format = get_option( 'time_format' );
262 }
263
264 public function get_wizard_url()
265 {
266 return admin_url( 'index.php?page=wp-adminify-setup-wizard' );
267 }
268
269 public function get_next_step_link()
270 {
271 $keys = array_keys( $this->steps );
272 return add_query_arg( 'step', $keys[array_search( $this->step, array_keys( $this->steps ) ) + 1], $this->get_wizard_url() );
273 }
274
275 public function get_prev_step_link()
276 {
277 $keys = array_keys( $this->steps );
278 return add_query_arg( 'step', $keys[array_search( $this->step, array_keys( $this->steps ) ) - 1], $this->get_wizard_url() );
279 }
280
281 public function setup_wizard_header()
282 {
283 header( 'Content-Type: ' . get_option( 'html_type' ) . '; charset=' . get_option( 'blog_charset' ) );
284 if ( !defined( 'WP_ADMIN' ) ) {
285 require_once ABSPATH . 'wp-admin/admin.php';
286 }
287 global
288 $title,
289 $hook_suffix,
290 $current_screen,
291 $wp_locale,
292 $pagenow,
293 $update_title,
294 $total_update_count,
295 $parent_file
296 ;
297 if ( empty($current_screen) ) {
298 set_current_screen();
299 }
300 get_admin_page_title();
301 $title = strip_tags( $title );
302
303 if ( is_network_admin() ) {
304 $admin_title = sprintf( __( 'Network Admin: %s' ), get_network()->site_name );
305 } elseif ( is_user_admin() ) {
306 $admin_title = sprintf( __( 'User Dashboard: %s' ), get_network()->site_name );
307 } else {
308 $admin_title = get_bloginfo( 'name' );
309 }
310
311
312 if ( $admin_title === $title ) {
313 $admin_title = sprintf( __( '%s &#8212; WordPress' ), $title );
314 } else {
315 $admin_title = sprintf( __( '%1$s &lsaquo; %2$s &#8212; WordPress' ), $title, $admin_title );
316 }
317
318 if ( wp_is_recovery_mode() ) {
319 $admin_title = sprintf( __( 'Recovery Mode &#8212; %s' ), $admin_title );
320 }
321 $admin_title = apply_filters( 'admin_title', $admin_title, $title );
322 wp_user_settings();
323 _wp_admin_html_begin();
324 ?>
325
326 <title><?php
327 echo esc_html( $admin_title ) ;
328 ?></title>
329
330 <?php
331 $admin_body_class = preg_replace( '/[^a-z0-9_-]+/i', '-', $hook_suffix ?? '' );
332 ?>
333
334 <script type="text/javascript">
335 addLoadEvent = function(func) {
336 if (typeof jQuery !== 'undefined') jQuery(document).ready(func);
337 else if (typeof wpOnload !== 'function') {
338 wpOnload = func;
339 } else {
340 var oldonload = wpOnload;
341 wpOnload = function() {
342 oldonload();
343 func();
344 }
345 }
346 };
347 var ajaxurl = '<?php
348 echo esc_js( admin_url( 'admin-ajax.php', 'relative' ) ) ;
349 ?>',
350 pagenow = '<?php
351 echo esc_js( $current_screen->id ) ;
352 ?>',
353 typenow = '<?php
354 echo esc_js( $current_screen->post_type ) ;
355 ?>',
356 adminpage = '<?php
357 echo esc_js( $admin_body_class ) ;
358 ?>',
359 thousandsSeparator = '<?php
360 echo esc_js( $wp_locale->number_format['thousands_sep'] ) ;
361 ?>',
362 decimalPoint = '<?php
363 echo esc_js( $wp_locale->number_format['decimal_point'] ) ;
364 ?>',
365 isRtl = <?php
366 echo (int) is_rtl() ;
367 ?>;
368 </script>
369
370 <?php
371 do_action( 'admin_enqueue_scripts', $hook_suffix );
372 do_action( "admin_print_styles-{$hook_suffix}" );
373 do_action( 'admin_print_styles' );
374 do_action( "admin_print_scripts-{$hook_suffix}" );
375 do_action( 'admin_print_scripts' );
376 do_action( "admin_head-{$hook_suffix}" );
377 ?>
378
379 <style>
380 body.wp-adminify-sw-setup .wp-adminify-loader,
381 body.wp-adminify-sw-setup #wp-adminify--circle--menu {
382 display: none !important;
383 }
384 </style>
385
386 </head>
387
388 <body class="wp-adminify-sw-setup wp-core-ui">
389
390 <script type="text/javascript">
391 document.body.className = document.body.className.replace('no-js', 'js');
392 </script>
393
394 <h1 class="wp-adminify-sw-logo">
395 <a target="_blank" href="https://wpadminify.com/">
396 <img src="<?php
397 echo esc_url( WP_ADMINIFY_ASSETS_IMAGE ) . 'logos/logo-text-light.svg' ;
398 ?>" alt="<?php
399 esc_attr_e( 'WP Adminify Logo', 'adminify' );
400 ?>" height="80" width="200">
401 </a>
402 </h1>
403
404 <?php
405 }
406
407 public function setup_wizard_footer()
408 {
409 global $hook_suffix ;
410 do_action( 'admin_footer', '' );
411 do_action( "admin_print_footer_scripts-{$hook_suffix}" );
412 do_action( 'admin_print_footer_scripts' );
413 do_action( "admin_footer-{$hook_suffix}" );
414
415 if ( 'next_steps' === $this->step ) {
416 ?>
417 <a class="wp-adminify-sw-return-to-dashboard" href="<?php
418 echo esc_url( admin_url() . '?adminify_setup_done_config=1' ) ;
419 ?>">
420 <?php
421 esc_html_e( 'Return to the WordPress Dashboard', 'adminify' );
422 ?>
423 </a>
424 <?php
425 }
426
427 ?>
428
429 </body>
430
431 </html>
432 <?php
433 }
434
435 public function item_class( $step_key )
436 {
437 if ( $step_key === $this->step ) {
438 return 'active';
439 }
440 if ( array_search( $this->step, array_keys( $this->steps ) ) > array_search( $step_key, array_keys( $this->steps ) ) ) {
441 return 'done';
442 }
443 return '';
444 }
445
446 public function setup_wizard_steps()
447 {
448 $output_steps = $this->steps;
449 array_shift( $output_steps );
450 ?>
451 <ol class="wp-adminify-sw-setup-steps">
452 <?php
453 foreach ( $output_steps as $step_key => $step ) {
454 ?>
455 <li class="<?php
456 echo Utils::wp_kses_custom( $this->item_class( $step_key ) ) ;
457 ?>">
458 <a href="<?php
459 echo esc_url( admin_url( 'index.php?page=wp-adminify-setup-wizard&step=' . esc_attr( $step_key ) ) ) ;
460 ?>"><?php
461 echo esc_html( $step['name'] ) ;
462 ?></a>
463 </li>
464 <?php
465 }
466 ?>
467 </ol>
468 <?php
469 }
470
471 public function setup_wizard_content()
472 {
473 echo '<div id="wp-adminify--setup-wizard" class="wp-adminify-sw-setup-content">' ;
474 call_user_func( $this->steps[$this->step]['view'] );
475 echo '</div>' ;
476 }
477
478 // Buttons
479 public function next_step_buttons( $first = false )
480 {
481 ?>
482 <p class="wp-adminify-sw-setup-actions step">
483 <input type="submit" class="button-primary button button-large button-next" value="<?php
484 esc_attr_e( 'Continue', 'adminify' );
485 ?>" />
486 <a href="<?php
487 echo esc_url( $this->get_next_step_link() ) ;
488 ?>" class="button button-large button-next"><?php
489 esc_html_e( 'Skip this step', 'adminify' );
490 ?></a>
491 <?php
492
493 if ( $first == false ) {
494 echo '<a href="' . esc_url( $this->get_prev_step_link() ) . '" class="button button-large button-next">' . esc_html__( 'Back', 'adminify' ) . '</a>' ;
495 } else {
496 echo '<a href="' . esc_url( admin_url( 'admin.php?page=wp-adminify-settings&adminify_setup_done_config=1' ) ) . '" class="button button-large button-next">' . esc_html__( 'Abort', 'adminify' ) . '</a>' ;
497 }
498
499 ?>
500 </p>
501 <?php
502 }
503
504 // Step: Introduction
505 public function jltwp_adminify_step_introduction()
506 {
507 ?>
508 <h1><?php
509 esc_html_e( 'Welcome to the future of configuring WordPress!', 'adminify' );
510 ?></h1>
511 <p>
512 <?php
513 $intro_content = sprintf( __( 'Thank you for choosing <a href="%1$s" target="_blank>%2$s</a>. An easier way to set up and manage your WordPress website! This quick setup wizard will help you configure the basic settings for your site. It’s completely optional and shouldn’t take longer than five minutes.', 'adminify' ), esc_url( 'https://wpadminify.com' ), __( 'WP Adminify', 'adminify' ) );
514 echo wp_kses_post( $intro_content ) ;
515 ?>
516 </p>
517 <p>
518 <?php
519 esc_html_e( 'Need help with configuring WP Adminify? Check this tutorial on: ', 'adminify' );
520 ?>
521 <a href="https://www.youtube.com/playlist?list=PLqpMw0NsHXV-EKj9Xm1DMGa6FGniHHly8" target="_blank">
522 <?php
523 esc_html_e( 'Youtube', 'adminify' );
524 ?>
525 </a>
526 </p>
527 <p>
528 <?php
529 esc_html_e( 'No time right now? If you don’t want to go through the wizard, you can skip and return to the plugin\'s dashboard. Come back anytime if you change your mind!', 'adminify' );
530 ?>
531 </p>
532 <p class="wp-adminify-sw-setup-actions step">
533 <a href="<?php
534 echo esc_url( $this->get_next_step_link() ) ;
535 ?>" class="button-primary button button-large button-next">
536 <?php
537 esc_html_e( 'Let\'s Go!', 'adminify' );
538 ?>
539 </a>
540 <a href="<?php
541 echo esc_url( admin_url( 'admin.php?page=wp-adminify-settings' ) ) ;
542 ?>" class="button button-large">
543 <?php
544 esc_html_e( 'Not right now', 'adminify' );
545 ?>
546 </a>
547 </p>
548 <?php
549 }
550
551 // Step: Module Settings
552 public function setup_step_modules()
553 {
554 ?>
555 <h1><?php
556 esc_html_e( 'Module Settings', 'adminify' );
557 ?></h1>
558 <form method="post" @submit.prevent="handleSubmit">
559
560 <table class="form-table">
561
562 <tr>
563 <th scope="row">
564 <label for="admin_ui">
565 <?php
566 esc_html_e( 'Dashboard Design UI', 'adminify' );
567 ?>
568 </label>
569 </th>
570
571 <td class="updated">
572 <input type="checkbox" name="admin_ui" id="admin_ui" class="switch-input" v-model="settings.admin_ui" />
573 <label for="admin_ui" class="switch-label">
574 <span class="toggle--on"><?php
575 esc_html_e( 'WP Adminify', 'adminify' );
576 ?></span>
577 <span class="toggle--off"><?php
578 esc_html_e( 'WordPress Default', 'adminify' );
579 ?></span>
580 </label>
581 <span class="description">
582 <?php
583 esc_html_e( 'Select which design you want - WordPress UI / Adminify UI', 'adminify' );
584 ?>
585 </span>
586 </td>
587 </tr>
588
589 <tr>
590 <th scope="row">
591 <label for="folders"><?php
592 esc_html_e( 'Folders', 'adminify' );
593 ?></label>
594 </th>
595
596 <td class="updated">
597 <input type="checkbox" name="folders" id="folders" class="switch-input" v-model="settings.folders">
598 <label for="folders" class="switch-label">
599 <span class="toggle--on"><?php
600 esc_html_e( 'Enable', 'adminify' );
601 ?></span>
602 <span class="toggle--off"><?php
603 esc_html_e( 'Disable', 'adminify' );
604 ?></span>
605 </label>
606 <span class="description">
607 <?php
608 esc_html_e( 'Enable/Disable Folders Module for Post/Page/Media', 'adminify' );
609 ?>
610 </span>
611 </td>
612 </tr>
613
614 <tr>
615 <th scope="row">
616 <label for="login_customizer"><?php
617 esc_html_e( 'Login Customizer', 'adminify' );
618 ?></label>
619 </th>
620
621 <td class="updated">
622 <input type="checkbox" name="login_customizer" id="login_customizer" class="switch-input" v-model="settings.login_customizer">
623 <label for="login_customizer" class="switch-label">
624 <span class="toggle--on"><?php
625 esc_html_e( 'Enable', 'adminify' );
626 ?></span>
627 <span class="toggle--off"><?php
628 esc_html_e( 'Disable', 'adminify' );
629 ?></span>
630 </label>
631 <span class="description">
632 <?php
633 esc_html_e( 'Enable/Disable Login Customizer Module', 'adminify' );
634 ?>
635 </span>
636 </td>
637 </tr>
638
639 <tr>
640 <th scope="row">
641 <label for="admin_columns"><?php
642 esc_html_e( 'Admin Columns', 'adminify' );
643 ?></label>
644 </th>
645 <td class="updated">
646 <input type="checkbox" name="admin_columns" id="admin_columns" class="switch-input" v-model="settings.admin_columns">
647 <label for="admin_columns" class="switch-label">
648 <span class="toggle--on"><?php
649 esc_html_e( 'Enable', 'adminify' );
650 ?></span>
651 <span class="toggle--off"><?php
652 esc_html_e( 'Disable', 'adminify' );
653 ?></span>
654 </label>
655 <span class="description">
656 <?php
657 esc_html_e( 'Enable/Disable Admin Columns Module', 'adminify' );
658 ?>
659 </span>
660 </td>
661 </tr>
662
663 <tr>
664 <th scope="row">
665 <label for="menu_editor"><?php
666 esc_html_e( 'Menu Editor', 'adminify' );
667 ?></label>
668 </th>
669 <td class="updated">
670 <input type="checkbox" name="menu_editor" id="menu_editor" class="switch-input" v-model="settings.menu_editor">
671 <label for="menu_editor" class="switch-label">
672 <span class="toggle--on"><?php
673 esc_html_e( 'Enable', 'adminify' );
674 ?></span>
675 <span class="toggle--off"><?php
676 esc_html_e( 'Disable', 'adminify' );
677 ?></span>
678 </label>
679 <span class="description">
680 <?php
681 esc_html_e( 'Enable/Disable Menu Editor Module', 'adminify' );
682 ?>
683 </span>
684 </td>
685 </tr>
686
687 <tr>
688 <th scope="row">
689 <label for="dashboard_widgets"><?php
690 esc_html_e( 'Dashboard & Welcome Widget', 'adminify' );
691 ?></label>
692 </th>
693 <td class="updated">
694 <input type="checkbox" name="dashboard_widgets" id="dashboard_widgets" class="switch-input" v-model="settings.dashboard_widgets">
695 <label for="dashboard_widgets" class="switch-label">
696 <span class="toggle--on"><?php
697 esc_html_e( 'Enable', 'adminify' );
698 ?></span>
699 <span class="toggle--off"><?php
700 esc_html_e( 'Disable', 'adminify' );
701 ?></span>
702 </label>
703 <span class="description">
704 <?php
705 esc_html_e( 'Enable/Disable Dashboard & Welcome Widget Module', 'adminify' );
706 ?>
707 </span>
708 </td>
709 </tr>
710
711 <tr>
712 <th scope="row">
713 <label for="pagespeed_insights"><?php
714 esc_html_e( 'Pagespeed Insights', 'adminify' );
715 ?></label>
716 </th>
717 <td class="updated">
718 <input type="checkbox" name="pagespeed_insights" id="pagespeed_insights" class="switch-input" v-model="settings.pagespeed_insights">
719 <label for="pagespeed_insights" class="switch-label">
720 <span class="toggle--on"><?php
721 esc_html_e( 'Enable', 'adminify' );
722 ?></span>
723 <span class="toggle--off"><?php
724 esc_html_e( 'Disable', 'adminify' );
725 ?></span>
726 </label>
727 <span class="description">
728 <?php
729 esc_html_e( 'Enable/Disable Pagespeed Insights Module', 'adminify' );
730 ?>
731 </span>
732 </td>
733 </tr>
734
735 <tr>
736 <th scope="row">
737 <label for="custom_css_js"><?php
738 esc_html_e( 'Header/Footer Scripts', 'adminify' );
739 ?></label>
740 </th>
741 <td class="updated">
742 <input type="checkbox" name="custom_css_js" id="custom_css_js" class="switch-input" v-model="settings.custom_css_js">
743 <label for="custom_css_js" class="switch-label">
744 <span class="toggle--on"><?php
745 esc_html_e( 'Enable', 'adminify' );
746 ?></span>
747 <span class="toggle--off"><?php
748 esc_html_e( 'Disable', 'adminify' );
749 ?></span>
750 </label>
751 <span class="description">
752 <?php
753 esc_html_e( 'Enable/Disable Header/Footer Scripts Module', 'adminify' );
754 ?>
755 </span>
756 </td>
757 </tr>
758
759 <tr>
760 <th scope="row">
761 <label for="quick_menu"><?php
762 esc_html_e( 'Quick Menu', 'adminify' );
763 ?></label>
764 </th>
765 <td class="updated">
766 <input type="checkbox" name="quick_menu" id="quick_menu" class="switch-input" v-model="settings.quick_menu">
767 <label for="quick_menu" class="switch-label">
768 <span class="toggle--on"><?php
769 esc_html_e( 'Enable', 'adminify' );
770 ?></span>
771 <span class="toggle--off"><?php
772 esc_html_e( 'Disable', 'adminify' );
773 ?></span>
774 </label>
775 <span class="description">
776 <?php
777 esc_html_e( 'Enable/Disable Quick Menu Module', 'adminify' );
778 ?>
779 </span>
780 </td>
781 </tr>
782
783 <tr>
784 <th scope="row">
785 <label for="menu_duplicator"><?php
786 esc_html_e( 'Menu Duplicator', 'adminify' );
787 ?></label>
788 </th>
789 <td class="updated">
790 <input type="checkbox" name="menu_duplicator" id="menu_duplicator" class="switch-input" v-model="settings.menu_duplicator">
791 <label for="menu_duplicator" class="switch-label">
792 <span class="toggle--on"><?php
793 esc_html_e( 'Enable', 'adminify' );
794 ?></span>
795 <span class="toggle--off"><?php
796 esc_html_e( 'Disable', 'adminify' );
797 ?></span>
798 </label>
799 <span class="description">
800 <?php
801 esc_html_e( 'Enable/Disable Menu Duplicator Module', 'adminify' );
802 ?>
803 </span>
804 </td>
805 </tr>
806
807 <tr>
808 <th scope="row">
809 <label for="notification_bar"><?php
810 esc_html_e( 'Notification Bar', 'adminify' );
811 ?></label>
812 </th>
813 <td class="updated">
814 <input type="checkbox" name="notification_bar" id="notification_bar" class="switch-input" v-model="settings.notification_bar">
815 <label for="notification_bar" class="switch-label">
816 <span class="toggle--on"><?php
817 esc_html_e( 'Enable', 'adminify' );
818 ?></span>
819 <span class="toggle--off"><?php
820 esc_html_e( 'Disable', 'adminify' );
821 ?></span>
822 </label>
823 <span class="description">
824 <?php
825 esc_html_e( 'Enable/Disable Notification Bar Module', 'adminify' );
826 ?>
827 </span>
828 </td>
829 </tr>
830
831 <tr>
832 <th scope="row">
833 <label for="activity_logs"><?php
834 esc_html_e( 'Activity Logs', 'adminify' );
835 ?></label>
836 </th>
837 <td class="updated">
838 <input type="checkbox" name="activity_logs" id="activity_logs" class="switch-input" v-model="settings.activity_logs">
839 <label for="activity_logs" class="switch-label">
840 <span class="toggle--on"><?php
841 esc_html_e( 'Enable', 'adminify' );
842 ?></span>
843 <span class="toggle--off"><?php
844 esc_html_e( 'Disable', 'adminify' );
845 ?></span>
846 </label>
847 <span class="description">
848 <?php
849 esc_html_e( 'Enable/Disable Activity Logs Module', 'adminify' );
850 ?>
851 </span>
852 </td>
853 </tr>
854
855 <tr>
856 <th scope="row">
857 <label for="post_duplicator"><?php
858 esc_html_e( 'Post Duplicator', 'adminify' );
859 ?></label>
860 </th>
861 <td class="updated">
862 <input type="checkbox" name="post_duplicator" id="post_duplicator" class="switch-input" v-model="settings.post_duplicator">
863 <label for="post_duplicator" class="switch-label">
864 <span class="toggle--on"><?php
865 esc_html_e( 'Enable', 'adminify' );
866 ?></span>
867 <span class="toggle--off"><?php
868 esc_html_e( 'Disable', 'adminify' );
869 ?></span>
870 </label>
871 <span class="description">
872 <?php
873 esc_html_e( 'Enable/Disable Post Duplicator Module', 'adminify' );
874 ?>
875 </span>
876 </td>
877 </tr>
878
879 <tr>
880 <th scope="row">
881 <label for="admin_pages"><?php
882 esc_html_e( 'Admin Pages', 'adminify' );
883 ?></label>
884 </th>
885 <td class="updated">
886 <input type="checkbox" name="admin_pages" id="admin_pages" class="switch-input" v-model="settings.admin_pages">
887 <label for="admin_pages" class="switch-label">
888 <span class="toggle--on"><?php
889 esc_html_e( 'Enable', 'adminify' );
890 ?></span>
891 <span class="toggle--off"><?php
892 esc_html_e( 'Disable', 'adminify' );
893 ?></span>
894 </label>
895 <span class="description">
896 <?php
897 esc_html_e( 'Enable/Disable Admin Pages Module', 'adminify' );
898 ?>
899 </span>
900 </td>
901 </tr>
902
903 <tr>
904 <th scope="row">
905 <label for="sidebar_generator"><?php
906 esc_html_e( 'Sidebar Generator', 'adminify' );
907 ?></label>
908 </th>
909 <td class="updated">
910 <input type="checkbox" name="sidebar_generator" id="sidebar_generator" class="switch-input" v-model="settings.sidebar_generator">
911 <label for="sidebar_generator" class="switch-label">
912 <span class="toggle--on"><?php
913 esc_html_e( 'Enable', 'adminify' );
914 ?></span>
915 <span class="toggle--off"><?php
916 esc_html_e( 'Disable', 'adminify' );
917 ?></span>
918 </label>
919 <span class="description">
920 <?php
921 esc_html_e( 'Enable/Disable Sidebar Generator Module', 'adminify' );
922 ?>
923 </span>
924 </td>
925 </tr>
926
927 <tr>
928 <th scope="row">
929 <label for="post_types_order"><?php
930 esc_html_e( 'Post Types Order', 'adminify' );
931 ?></label>
932 </th>
933 <td class="updated">
934 <input type="checkbox" name="post_types_order" id="post_types_order" class="switch-input" v-model="settings.post_types_order">
935 <label for="post_types_order" class="switch-label">
936 <span class="toggle--on"><?php
937 esc_html_e( 'Enable', 'adminify' );
938 ?></span>
939 <span class="toggle--off"><?php
940 esc_html_e( 'Disable', 'adminify' );
941 ?></span>
942 </label>
943 <span class="description">
944 <?php
945 esc_html_e( 'Enable/Disable Post Types Order Module', 'adminify' );
946 ?>
947 </span>
948 </td>
949 </tr>
950
951 <tr>
952 <th scope="row">
953 <label for="server_info"><?php
954 esc_html_e( 'Server Info', 'adminify' );
955 ?></label>
956 </th>
957 <td class="updated">
958 <input type="checkbox" name="server_info" id="server_info" class="switch-input" v-model="settings.server_info">
959 <label for="server_info" class="switch-label">
960 <span class="toggle--on"><?php
961 esc_html_e( 'Enable', 'adminify' );
962 ?></span>
963 <span class="toggle--off"><?php
964 esc_html_e( 'Disable', 'adminify' );
965 ?></span>
966 </label>
967 <span class="description">
968 <?php
969 esc_html_e( 'Enable/Disable Server Info Module', 'adminify' );
970 ?>
971 </span>
972 </td>
973 </tr>
974
975 <tr>
976 <th scope="row">
977 <label for="disable_comments"><?php
978 esc_html_e( 'Disable Comments', 'adminify' );
979 ?></label>
980 </th>
981 <td class="updated">
982 <input type="checkbox" name="disable_comments" id="disable_comments" class="switch-input" v-model="settings.disable_comments">
983 <label for="disable_comments" class="switch-label">
984 <span class="toggle--on"><?php
985 esc_html_e( 'Enable', 'adminify' );
986 ?></span>
987 <span class="toggle--off"><?php
988 esc_html_e( 'Disable', 'adminify' );
989 ?></span>
990 </label>
991 <span class="description">
992 <?php
993 esc_html_e( 'Enable/Disable Disable Comments Module', 'adminify' );
994 ?>
995 </span>
996 </td>
997 </tr>
998
999 </table>
1000
1001 <?php
1002 $this->next_step_buttons( true );
1003 ?>
1004 </form>
1005 <span>
1006 <?php
1007 esc_html_e( 'For more settings, check the WP Adminify\'s ', 'adminify' );
1008 echo '"<a href="' . esc_url( admin_url( 'admin.php?page=wp-adminify-settings#tab=modules' ) ) . '" target="_blank">' ;
1009 esc_html_e( 'Module Settings', 'adminify' );
1010 echo '</a>".' ;
1011 ?>
1012 </span>
1013 <br /><br />
1014 <?php
1015 }
1016
1017 // Customize Step
1018 public function setup_step_customize()
1019 {
1020 ?>
1021 <h1><?php
1022 esc_html_e( 'Design Settings', 'adminify' );
1023 ?></h1>
1024
1025 <form method="post" @submit.prevent="handleSubmit">
1026
1027 <table class="form-table">
1028 <tr>
1029 <th scope="row"><label for="admin_bar_mode">
1030 <?php
1031 esc_html_e( 'Color Mode', 'adminify' );
1032 ?></label>
1033 </th>
1034 <td class="updated">
1035 <input type="checkbox" name="admin_bar_mode" id="admin_bar_mode" class="switch-input" v-model="settings.admin_bar_mode">
1036 <label for="admin_bar_mode" class="switch-label">
1037 <span class="toggle--on"><?php
1038 esc_html_e( 'Light', 'adminify' );
1039 ?></span>
1040 <span class="toggle--off"><?php
1041 esc_html_e( 'Dark', 'adminify' );
1042 ?></span>
1043 </label>
1044 <span class="description">
1045 <?php
1046 esc_html_e( 'You can choose Light/Dark Mode', 'adminify' );
1047 ?>
1048 </span>
1049 </td>
1050 </tr>
1051
1052 <tr class="admin_bar_logo_type">
1053 <th scope="row">
1054 <label for="admin_bar_logo_type"><?php
1055 esc_html_e( 'Logo Type', 'adminify' );
1056 ?></label>
1057 </th>
1058 <td>
1059 <select id="admin_bar_logo_type" name="admin_bar_logo_type" v-model="settings.admin_bar_logo_type">
1060 <option value="image_logo"><?php
1061 esc_html_e( 'Image', 'adminify' );
1062 ?></option>
1063 <option value="text_logo"><?php
1064 esc_html_e( 'Text', 'adminify' );
1065 ?></option>
1066 </select>
1067 <span class="description">
1068 <?php
1069 esc_html_e( 'Select Admin Logo Type.', 'adminify' );
1070 ?>
1071 </span>
1072 </td>
1073 </tr>
1074
1075 <tr class="admin_bar_light_logo" v-if="settings.admin_bar_mode && settings.admin_bar_logo_type == 'image_logo'">
1076 <!-- If color mode is light -->
1077 <th scope="row">
1078 <label for="admin_bar_light_logo"><?php
1079 esc_html_e( 'Light Logo', 'adminify' );
1080 ?></label>
1081 </th>
1082 <td>
1083 <div>
1084 <input type="text" name="admin_bar_light_logo" class="adminify--url" readonly="readonly" placeholder="Not selected" v-model="settings.admin_bar_light_mode.admin_bar_light_logo.url">
1085 <a href="#" class="button button-primary adminify--button" @click.prevent="handle_media( settings.admin_bar_light_mode.admin_bar_light_logo )">
1086 <?php
1087 esc_html_e( 'Add Light Logo', 'adminify' );
1088 ?>
1089 </a>
1090 </div>
1091 <span class="description">
1092 <?php
1093 esc_html_e( 'Set Logo Image for Light Mode.', 'adminify' );
1094 ?>
1095 </span>
1096 </td>
1097 </tr>
1098
1099 <tr v-if="settings.admin_bar_mode && settings.admin_bar_logo_type == 'text_logo'">
1100 <!-- If color mode is light -->
1101 <th scope="row">
1102 <label for="admin_bar_light_logo_text"><?php
1103 esc_html_e( 'Logo Text', 'adminify' );
1104 ?></label>
1105 </th>
1106 <td>
1107 <div>
1108 <input type="text" placeholder="<?php
1109 esc_html_e( 'Logo Text', 'adminify' );
1110 ?>" name="admin_bar_light_logo_text" v-model="settings.admin_bar_light_mode.admin_bar_light_logo_text" id="admin_bar_light_logo_text" class="wp-adminify-sw-date-field">
1111 </div>
1112 <span class="description">
1113 <?php
1114 esc_html_e( 'Light Logo Text', 'adminify' );
1115 ?>
1116 </span>
1117 </td>
1118 </tr>
1119
1120 <tr class="admin_bar_dark_logo" v-if="!settings.admin_bar_mode && settings.admin_bar_logo_type == 'image_logo'">
1121 <!-- If color mode is dark -->
1122 <th scope="row">
1123 <label for="admin_bar_dark_logo"><?php
1124 esc_html_e( 'Dark Logo', 'adminify' );
1125 ?></label>
1126 </th>
1127 <td>
1128 <div>
1129 <input type="text" name="admin_bar_dark_logo" class="adminify--url" readonly="readonly" placeholder="Not selected" v-model="settings.admin_bar_dark_mode.admin_bar_dark_logo.url">
1130 <a href="#" class="button button-primary adminify--button" @click.prevent="handle_media( settings.admin_bar_dark_mode.admin_bar_dark_logo )">
1131 <?php
1132 esc_html_e( 'Add Dark Logo', 'adminify' );
1133 ?>
1134 </a>
1135 </div>
1136 <span class="description">
1137 <?php
1138 esc_html_e( 'Set Logo Image for Dark Mode', 'adminify' );
1139 ?>
1140 </span>
1141 </td>
1142 </tr>
1143
1144 <tr v-if="!settings.admin_bar_mode && settings.admin_bar_logo_type == 'text_logo'">
1145 <!-- If color mode is dark -->
1146 <th scope="row">
1147 <label for="admin_bar_dark_logo_text"><?php
1148 esc_html_e( 'Logo Text', 'adminify' );
1149 ?></label>
1150 </th>
1151 <td>
1152 <div>
1153 <input type="text" placeholder="<?php
1154 esc_html_e( 'Logo Text', 'adminify' );
1155 ?>" name="admin_bar_dark_logo_text" value="<?php
1156 echo ( !empty($this->options['admin_bar_dark_mode']['admin_bar_dark_logo_text']) ? esc_html( $this->options['admin_bar_dark_mode']['admin_bar_dark_logo_text'] ) : '' ) ;
1157 ?>" id="admin_bar_dark_logo_text" class="wp-adminify-sw-text-field">
1158 </div>
1159 <span class="description">
1160 <?php
1161 esc_html_e( 'Light Logo Text', 'adminify' );
1162 ?>
1163 </span>
1164 </td>
1165 </tr>
1166
1167 <tr class="footer_text">
1168 <th scope="row">
1169 <label for="footer_text"><?php
1170 esc_html_e( 'Admin Footer Text', 'adminify' );
1171 ?></label>
1172 </th>
1173 <td>
1174 <div>
1175 <textarea name="footer_text" id="footer_text" cols="30" rows="4" v-model="settings.footer_text"></textarea>
1176 </div>
1177 <span class="description">
1178 <?php
1179 esc_html_e( 'Set the Admin Footer Text.', 'adminify' );
1180 ?>
1181 </span>
1182 </td>
1183 </tr>
1184 </table>
1185
1186 <?php
1187 $this->next_step_buttons();
1188 ?>
1189 </form>
1190 <span>
1191 <?php
1192 esc_html_e( 'For more settings, check the plugin\'s ', 'adminify' );
1193 echo '"<a href="' . esc_url( admin_url( 'admin.php?page=wp-adminify-settings#tab=dark-light-mode' ) ) . '" target="_blank">' ;
1194 esc_html_e( 'Customize Settings', 'adminify' );
1195 echo '</a>".' ;
1196 ?>
1197 </span>
1198 <br /><br />
1199 <?php
1200 }
1201
1202 // Step: Menu Settings
1203 public function setup_step_menu()
1204 {
1205 ?>
1206
1207 <h1><?php
1208 esc_html_e( 'Menu Settings', 'adminify' );
1209 ?></h1>
1210
1211 <form method="post" @submit.prevent="handleSubmit">
1212
1213 <table class="form-table">
1214
1215 <tr class="layout_type">
1216 <th scope="row">
1217 <label for="layout_type"><?php
1218 esc_html_e( 'Menu Type', 'adminify' );
1219 ?></label>
1220 </th>
1221 <td>
1222 <select id="layout_type" name="layout_type" v-model="settings.menu_layout_settings.layout_type">
1223 <option value="vertical"><?php
1224 esc_html_e( 'Vertical Menu', 'adminify' );
1225 ?></option>
1226 <?php
1227 ?>
1228 <option value="pro_menu_type"><?php
1229 esc_html_e( 'Horizontal Menu(Pro)', 'adminify' );
1230 ?></option>
1231 <?php
1232 ?>
1233 </select>
1234 <span class="description">
1235 <?php
1236 esc_html_e( 'Select Menu Layout Type.', 'adminify' );
1237 ?>
1238 </span>
1239 </td>
1240 </tr>
1241
1242 <!-- Start of Horizontal Layout -->
1243 <tr class="icon_style" v-if="settings.menu_layout_settings.layout_type == 'horizontal'">
1244 <th scope="row">
1245 <label for="site_name"><?php
1246 esc_html_e( 'Menu Item Style', 'adminify' );
1247 ?></label>
1248 </th>
1249 <td>
1250 <div class="wp-adminify-sw-radio-group">
1251 <input type="radio" id="horz_menu_type_icons_only" value="icons_only" v-model="settings.menu_layout_settings.horz_menu_type">
1252 <label for="horz_menu_type_icons_only"><?php
1253 esc_html_e( 'Icon Only', 'adminify' );
1254 ?></label>
1255
1256 <input type="radio" id="horz_menu_type_text_only" value="text_only" v-model="settings.menu_layout_settings.horz_menu_type">
1257 <label for="horz_menu_type_text_only"><?php
1258 esc_html_e( 'Text Only', 'adminify' );
1259 ?></label>
1260
1261 <input type="radio" id="horz_menu_type_both" value="both" v-model="settings.menu_layout_settings.horz_menu_type">
1262 <label for="horz_menu_type_both"><?php
1263 esc_html_e( 'Both', 'adminify' );
1264 ?></label>
1265 </div>
1266 </td>
1267 </tr>
1268 <!-- End of Horizontal Layout -->
1269
1270
1271 <!-- Start of Vertical Layout -->
1272 <tr class="menu_hover_submenu" v-if="settings.menu_layout_settings.layout_type == 'vertical'">
1273 <th scope="row">
1274 <label for="site_name"><?php
1275 esc_html_e( 'Sub Menu Style', 'adminify' );
1276 ?></label>
1277 </th>
1278 <td>
1279 <div class="wp-adminify-sw-radio-group">
1280 <input type="radio" id="menu_hover_submenu_classic" value="classic" v-model="settings.menu_layout_settings.menu_hover_submenu">
1281 <label for="menu_hover_submenu_classic"><?php
1282 esc_html_e( 'Classic', 'adminify' );
1283 ?></label>
1284
1285 <input type="radio" id="menu_hover_submenu_accordion" value="accordion" v-model="settings.menu_layout_settings.menu_hover_submenu">
1286 <label for="menu_hover_submenu_accordion"><?php
1287 esc_html_e( 'Accordion', 'adminify' );
1288 ?></label>
1289
1290 <input type="radio" id="menu_hover_submenu_toggle" value="toggle" v-model="settings.menu_layout_settings.menu_hover_submenu">
1291 <label for="menu_hover_submenu_toggle"><?php
1292 esc_html_e( 'Toggle', 'adminify' );
1293 ?></label>
1294 </div>
1295 </td>
1296 </tr>
1297
1298 <tr class="icon_style" v-if="settings.menu_layout_settings.layout_type == 'vertical'">
1299 <th scope="row">
1300 <label for="site_name"><?php
1301 esc_html_e( 'Active Menu Style', 'adminify' );
1302 ?></label>
1303 </th>
1304 <td>
1305 <div class="wp-adminify-sw-radio-group">
1306 <input type="radio" id="icon_style_classic" value="classic" v-model="settings.menu_layout_settings.icon_style">
1307 <label for="icon_style_classic"><?php
1308 esc_html_e( 'Classic', 'adminify' );
1309 ?></label>
1310
1311 <input type="radio" id="icon_style_rounded" value="rounded" v-model="settings.menu_layout_settings.icon_style">
1312 <label for="icon_style_rounded"><?php
1313 esc_html_e( 'Rounded', 'adminify' );
1314 ?></label>
1315 </div>
1316 </td>
1317 </tr>
1318
1319 <!-- End of Vertical Layout -->
1320
1321 </table>
1322
1323 <?php
1324 $this->next_step_buttons();
1325 ?>
1326 </form>
1327 <span>
1328 <?php
1329 esc_html_e( 'For more settings, check the plugin\'s ', 'adminify' );
1330 echo '"<a href="' . esc_url( admin_url( 'admin.php?page=wp-adminify-settings#tab=menu-settings' ) ) . '" target="_blank">' ;
1331 esc_html_e( 'Menu Settings', 'adminify' );
1332 echo '</a>".' ;
1333 ?>
1334 </span>
1335 <br /><br />
1336 <?php
1337 }
1338
1339 public function setup_step_admin_notices()
1340 {
1341 ?>
1342 <h1><?php
1343 esc_html_e( 'Admin Notices', 'adminify' );
1344 ?></h1>
1345 <form method="post" @submit.prevent="handleSubmit">
1346 <table class="form-table">
1347
1348 <?php
1349 ?>
1350
1351 <tr>
1352 <th scope="row">
1353 <label for="remove_welcome_panel"><?php
1354 esc_html_e( 'Remove Welcome Panel?', 'adminify' );
1355 ?></label>
1356 </th>
1357 <td class="updated">
1358 <input type="checkbox" name="remove_welcome_panel" id="remove_welcome_panel" class="switch-input" v-model="settings.remove_welcome_panel">
1359 <label for="remove_welcome_panel" class="switch-label">
1360 <span class="toggle--on"><?php
1361 esc_html_e( 'Yes', 'adminify' );
1362 ?></span>
1363 <span class="toggle--off"><?php
1364 esc_html_e( 'No', 'adminify' );
1365 ?></span>
1366 </label>
1367 <span class="description">
1368 <?php
1369 esc_html_e( 'Show/Remove Dashboard Welcome Panel', 'adminify' );
1370 ?>
1371 </span>
1372 </td>
1373 </tr>
1374
1375 <?php
1376 ?>
1377
1378 <tr>
1379 <th scope="row">
1380 <label for="remove_try_gutenberg_panel"><?php
1381 esc_html_e( 'Remove "Try Gutenberg" Panel?', 'adminify' );
1382 ?></label>
1383 </th>
1384 <td class="updated">
1385 <input type="checkbox" name="remove_try_gutenberg_panel" id="remove_try_gutenberg_panel" class="switch-input" v-model="settings.remove_try_gutenberg_panel">
1386 <label for="remove_try_gutenberg_panel" class="switch-label">
1387 <span class="toggle--on"><?php
1388 esc_html_e( 'Yes', 'adminify' );
1389 ?></span>
1390 <span class="toggle--off"><?php
1391 esc_html_e( 'No', 'adminify' );
1392 ?></span>
1393 </label>
1394 <span class="description">
1395 <?php
1396 esc_html_e( 'Show/Remove "Try Gutenberg" Panel', 'adminify' );
1397 ?>
1398 </span>
1399 </td>
1400 </tr>
1401
1402 <?php
1403 ?>
1404
1405
1406 </table>
1407
1408 <?php
1409 $this->next_step_buttons();
1410 ?>
1411 </form>
1412 <span>
1413 <?php
1414 esc_html_e( 'For more settings, check the plugin\'s ', 'adminify' );
1415 echo '"<a href="' . esc_url( admin_url( 'admin.php?page=wp-adminify-settings#tab=admin-notices' ) ) . '" target="_blank">' ;
1416 esc_html_e( 'Admin Notices Settings', 'adminify' );
1417 echo '</a>".' ;
1418 ?>
1419 </span>
1420 <br /><br />
1421 <?php
1422 }
1423
1424 public function setup_step_admin_bar()
1425 {
1426 ?>
1427
1428 <h1><?php
1429 esc_html_e( 'Admin Bar Settings', 'adminify' );
1430 ?></h1>
1431
1432 <form method="post" class="form-table" @submit.prevent="handleSubmit">
1433
1434 <table class="form-table">
1435
1436 <?php
1437 ?>
1438
1439 <tr>
1440 <th scope="row">
1441 <label for="admin_bar_menu">
1442 <?php
1443 esc_html_e( '"WP Adminify" Menu', 'adminify' );
1444 ?>
1445 </label>
1446 </th>
1447 <td class="updated">
1448 <input type="checkbox" name="admin_bar_menu" id="admin_bar_menu" class="switch-input" v-model="settings.admin_bar_settings.admin_bar_menu">
1449 <label for="admin_bar_menu" class="switch-label">
1450 <span class="toggle--on"><?php
1451 esc_html_e( 'Show', 'adminify' );
1452 ?></span>
1453 <span class="toggle--off"><?php
1454 esc_html_e( 'Hide', 'adminify' );
1455 ?></span>
1456 </label>
1457 <span class="description">
1458 <?php
1459 esc_html_e( 'Show/Hide Admin "WP Adminify" Menu on Admin bar', 'adminify' );
1460 ?>
1461 </span>
1462 </td>
1463 </tr>
1464
1465 <tr>
1466 <th scope="row">
1467 <label for="admin_bar_search">
1468 <?php
1469 esc_html_e( 'Search Form', 'adminify' );
1470 ?>
1471 </label>
1472 </th>
1473 <td class="updated">
1474 <input type="checkbox" name="admin_bar_search" id="admin_bar_search" class="switch-input" v-model="settings.admin_bar_settings.admin_bar_search">
1475 <label for="admin_bar_search" class="switch-label">
1476 <span class="toggle--on"><?php
1477 esc_html_e( 'Show', 'adminify' );
1478 ?></span>
1479 <span class="toggle--off"><?php
1480 esc_html_e( 'Hide', 'adminify' );
1481 ?></span>
1482 </label>
1483 <span class="description">
1484 <?php
1485 esc_html_e( 'Show/Hide Admin Bar Search Form', 'adminify' );
1486 ?>
1487 </span>
1488 </td>
1489 </tr>
1490
1491 <tr>
1492 <th scope="row">
1493 <label for="admin_bar_comments">
1494 <?php
1495 esc_html_e( 'Comments Icon', 'adminify' );
1496 ?>
1497 </label>
1498 </th>
1499 <td class="updated">
1500 <input type="checkbox" name="admin_bar_comments" id="admin_bar_comments" class="switch-input" v-model="settings.admin_bar_settings.admin_bar_comments">
1501 <label for="admin_bar_comments" class="switch-label">
1502 <span class="toggle--on"><?php
1503 esc_html_e( 'Show', 'adminify' );
1504 ?></span>
1505 <span class="toggle--off"><?php
1506 esc_html_e( 'Hide', 'adminify' );
1507 ?></span>
1508 </label>
1509 <span class="description">
1510 <?php
1511 esc_html_e( 'Show/Hide Admin Bar Comments Icon', 'adminify' );
1512 ?>
1513 </span>
1514 </td>
1515 </tr>
1516
1517 <tr>
1518 <th scope="row">
1519 <label for="admin_bar_view_website">
1520 <?php
1521 esc_html_e( 'View Website Icon', 'adminify' );
1522 ?>
1523 </label>
1524 </th>
1525 <td class="updated">
1526 <input type="checkbox" name="admin_bar_view_website" id="admin_bar_view_website" class="switch-input" v-model="settings.admin_bar_settings.admin_bar_view_website">
1527 <label for="admin_bar_view_website" class="switch-label">
1528 <span class="toggle--on"><?php
1529 esc_html_e( 'Show', 'adminify' );
1530 ?></span>
1531 <span class="toggle--off"><?php
1532 esc_html_e( 'Hide', 'adminify' );
1533 ?></span>
1534 </label>
1535 <span class="description">
1536 <?php
1537 esc_html_e( 'Show/Hide Admin Bar View Website Icon', 'adminify' );
1538 ?>
1539 </span>
1540 </td>
1541 </tr>
1542
1543 <tr>
1544 <th scope="row">
1545 <label for="admin_bar_dark_light_btn">
1546 <?php
1547 esc_html_e( 'Light/Dark Switcher', 'adminify' );
1548 ?>
1549 </label>
1550 </th>
1551 <td class="updated">
1552 <input type="checkbox" name="admin_bar_dark_light_btn" id="admin_bar_dark_light_btn" class="switch-input" v-model="settings.admin_bar_settings.admin_bar_dark_light_btn">
1553 <label for="admin_bar_dark_light_btn" class="switch-label">
1554 <span class="toggle--on"><?php
1555 esc_html_e( 'Show', 'adminify' );
1556 ?></span>
1557 <span class="toggle--off"><?php
1558 esc_html_e( 'Hide', 'adminify' );
1559 ?></span>
1560 </label>
1561 <span class="description">
1562 <?php
1563 esc_html_e( 'Show/Hide Admin Bar Light/Dark Switcher', 'adminify' );
1564 ?>
1565 </span>
1566 </td>
1567 </tr>
1568
1569 </table>
1570
1571 <?php
1572 $this->next_step_buttons();
1573 ?>
1574 </form>
1575 <span>
1576 <?php
1577 esc_html_e( 'For more settings, check the plugin\'s ', 'adminify' );
1578 echo '"<a href="' . esc_url( admin_url( 'admin.php?page=wp-adminify-settings#tab=admin-bar' ) ) . '" target="_blank">' ;
1579 esc_html_e( 'Admin Bar Settings', 'adminify' );
1580 echo '</a>".' ;
1581 ?>
1582 </span>
1583 <br /><br />
1584 <?php
1585 }
1586
1587 // Step: Tweaks
1588 public function setup_step_tweaks()
1589 {
1590 ?>
1591 <h1><?php
1592 esc_html_e( 'Tweaks Settings', 'adminify' );
1593 ?></h1>
1594 <form method="post" class="form-table" @submit.prevent="handleSubmit">
1595
1596 <table class="form-table">
1597
1598 <tr>
1599 <th scope="row">
1600 <label for="generator_wp_version"><?php
1601 esc_html_e( 'Remove Generator Version', 'adminify' );
1602 ?></label>
1603 </th>
1604 <td class="updated">
1605 <input type="checkbox" name="generator_wp_version" id="generator_wp_version" class="switch-input" v-model="settings.generator_wp_version">
1606 <label for="generator_wp_version" class="switch-label">
1607 <span class="toggle--on"><?php
1608 esc_html_e( 'Yes', 'adminify' );
1609 ?></span>
1610 <span class="toggle--off"><?php
1611 esc_html_e( 'No', 'adminify' );
1612 ?></span>
1613 </label>
1614 <span class="description">
1615 <?php
1616 esc_html_e( 'Remove WordPress Generator WordPress Version from Frontend and RSS Feed', 'adminify' );
1617 ?>
1618 </span>
1619 </td>
1620 </tr>
1621
1622 <tr>
1623 <th scope="row">
1624 <label for="remove_version_strings"><?php
1625 esc_html_e( 'Remove Version from Style and Script', 'adminify' );
1626 ?></label>
1627 </th>
1628 <td class="updated">
1629 <input type="checkbox" name="remove_version_strings" id="remove_version_strings" class="switch-input" v-model="settings.remove_version_strings">
1630 <label for="remove_version_strings" class="switch-label">
1631 <span class="toggle--on"><?php
1632 esc_html_e( 'Yes', 'adminify' );
1633 ?></span>
1634 <span class="toggle--off"><?php
1635 esc_html_e( 'No', 'adminify' );
1636 ?></span>
1637 </label>
1638 <span class="description">
1639 <?php
1640 esc_html_e( 'Remove Version Number from Styles/Scripts', 'adminify' );
1641 ?>
1642 </span>
1643 </td>
1644 </tr>
1645
1646 <tr>
1647 <th scope="row">
1648 <label for="remove_dashicons"><?php
1649 esc_html_e( 'Remove Dashicons', 'adminify' );
1650 ?></label>
1651 </th>
1652 <td class="updated">
1653 <input type="checkbox" name="remove_dashicons" id="remove_dashicons" class="switch-input" v-model="settings.remove_dashicons">
1654 <label for="remove_dashicons" class="switch-label">
1655 <span class="toggle--on"><?php
1656 esc_html_e( 'Yes', 'adminify' );
1657 ?></span>
1658 <span class="toggle--off"><?php
1659 esc_html_e( 'No', 'adminify' );
1660 ?></span>
1661 </label>
1662 <span class="description">
1663 <?php
1664 esc_html_e( 'Remove Dashicons from Admin Bar for non logged in users', 'adminify' );
1665 ?>
1666 </span>
1667 </td>
1668 </tr>
1669
1670 <tr>
1671 <th scope="row">
1672 <label for="remove_shortlink"><?php
1673 esc_html_e( 'Remove Shortlink', 'adminify' );
1674 ?></label>
1675 </th>
1676 <td class="updated">
1677 <input type="checkbox" name="remove_shortlink" id="remove_shortlink" class="switch-input" v-model="settings.remove_shortlink">
1678 <label for="remove_shortlink" class="switch-label">
1679 <span class="toggle--on"><?php
1680 esc_html_e( 'Yes', 'adminify' );
1681 ?></span>
1682 <span class="toggle--off"><?php
1683 esc_html_e( 'No', 'adminify' );
1684 ?></span>
1685 </label>
1686 <span class="description">
1687 <?php
1688 esc_html_e( 'Remove "<link rel=\'shortlink\'..." from head section', 'adminify' );
1689 ?>
1690 </span>
1691 </td>
1692 </tr>
1693
1694 <tr>
1695 <th scope="row">
1696 <label for="remove_canonical"><?php
1697 esc_html_e( 'Remove Canonical URL', 'adminify' );
1698 ?></label>
1699 </th>
1700 <td class="updated">
1701 <input type="checkbox" name="remove_canonical" id="remove_canonical" class="switch-input" v-model="settings.remove_canonical">
1702 <label for="remove_canonical" class="switch-label">
1703 <span class="toggle--on"><?php
1704 esc_html_e( 'Yes', 'adminify' );
1705 ?></span>
1706 <span class="toggle--off"><?php
1707 esc_html_e( 'No', 'adminify' );
1708 ?></span>
1709 </label>
1710 <span class="description">
1711 <?php
1712 esc_html_e( 'Remove &lt;link rel="canonical" href="http://www.site.com/some-url" /&gt; from head section', 'adminify' );
1713 ?>
1714 </span>
1715 </td>
1716 </tr>
1717
1718 <tr>
1719 <th scope="row">
1720 <label for="remove_emoji"><?php
1721 esc_html_e( 'Remove Emoji Styles and Scripts', 'adminify' );
1722 ?></label>
1723 </th>
1724 <td class="updated">
1725 <input type="checkbox" name="remove_emoji" id="remove_emoji" class="switch-input" v-model="settings.remove_emoji">
1726 <label for="remove_emoji" class="switch-label">
1727 <span class="toggle--on"><?php
1728 esc_html_e( 'Yes', 'adminify' );
1729 ?></span>
1730 <span class="toggle--off"><?php
1731 esc_html_e( 'No', 'adminify' );
1732 ?></span>
1733 </label>
1734 <span class="description">
1735 <?php
1736 esc_html_e( 'Remove Emoji styles and scripts from head section', 'adminify' );
1737 ?>
1738 </span>
1739 </td>
1740 </tr>
1741
1742 <tr>
1743 <th scope="row">
1744 <label for="disable_xmlrpc"><?php
1745 esc_html_e( 'Disable XML-RPC', 'adminify' );
1746 ?></label>
1747 </th>
1748 <td class="updated">
1749 <input type="checkbox" name="disable_xmlrpc" id="disable_xmlrpc" class="switch-input" v-model="settings.disable_xmlrpc">
1750 <label for="disable_xmlrpc" class="switch-label">
1751 <span class="toggle--on"><?php
1752 esc_html_e( 'Yes', 'adminify' );
1753 ?></span>
1754 <span class="toggle--off"><?php
1755 esc_html_e( 'No', 'adminify' );
1756 ?></span>
1757 </label>
1758 <span class="description">
1759 <?php
1760 esc_html_e( 'Disable XML-RPC from head section', 'adminify' );
1761 ?>
1762 </span>
1763 </td>
1764 </tr>
1765
1766 <tr>
1767 <th scope="row">
1768 <label for="remove_feed"><?php
1769 esc_html_e( 'Remove Feed Links', 'adminify' );
1770 ?></label>
1771 </th>
1772 <td class="updated">
1773 <input type="checkbox" name="remove_feed" id="remove_feed" class="switch-input" v-model="settings.remove_feed">
1774 <label for="remove_feed" class="switch-label">
1775 <span class="toggle--on"><?php
1776 esc_html_e( 'Yes', 'adminify' );
1777 ?></span>
1778 <span class="toggle--off"><?php
1779 esc_html_e( 'No', 'adminify' );
1780 ?></span>
1781 </label>
1782 <span class="description">
1783 <?php
1784 esc_html_e( 'It will not disable feed functionality, just cleans head section', 'adminify' );
1785 ?>
1786 </span>
1787 </td>
1788 </tr>
1789
1790 <tr>
1791 <th scope="row">
1792 <label for="remove_pingback"><?php
1793 esc_html_e( 'Remove X-Pingback from HTTP Headers', 'adminify' );
1794 ?></label>
1795 </th>
1796 <td class="updated">
1797 <input type="checkbox" name="remove_pingback" id="remove_pingback" class="switch-input" v-model="settings.remove_pingback">
1798 <label for="remove_pingback" class="switch-label">
1799 <span class="toggle--on"><?php
1800 esc_html_e( 'Yes', 'adminify' );
1801 ?></span>
1802 <span class="toggle--off"><?php
1803 esc_html_e( 'No', 'adminify' );
1804 ?></span>
1805 </label>
1806 <span class="description">
1807 <?php
1808 esc_html_e( 'Remove "X-Pingback:..." from server response HTTP headers', 'adminify' );
1809 ?>
1810 </span>
1811 </td>
1812 </tr>
1813
1814 <tr>
1815 <th scope="row">
1816 <label for="remove_powered"><?php
1817 esc_html_e( 'Remove X-Powered-By from HTTP Headers', 'adminify' );
1818 ?></label>
1819 </th>
1820 <td class="updated">
1821 <input type="checkbox" name="remove_powered" id="remove_powered" class="switch-input" v-model="settings.remove_powered">
1822 <label for="remove_powered" class="switch-label">
1823 <span class="toggle--on"><?php
1824 esc_html_e( 'Yes', 'adminify' );
1825 ?></span>
1826 <span class="toggle--off"><?php
1827 esc_html_e( 'No', 'adminify' );
1828 ?></span>
1829 </label>
1830 <span class="description">
1831 <?php
1832 esc_html_e( 'Remove "X-Pingback:..." from server response HTTP headers', 'adminify' );
1833 ?>
1834 </span>
1835 </td>
1836 </tr>
1837
1838 <tr>
1839 <th scope="row">
1840 <label for="gravatar_query_strings"><?php
1841 esc_html_e( 'Remove Gravatar Query Strings', 'adminify' );
1842 ?></label>
1843 </th>
1844 <td class="updated">
1845 <input type="checkbox" name="gravatar_query_strings" id="gravatar_query_strings" class="switch-input" v-model="settings.gravatar_query_strings">
1846 <label for="gravatar_query_strings" class="switch-label">
1847 <span class="toggle--on"><?php
1848 esc_html_e( 'Yes', 'adminify' );
1849 ?></span>
1850 <span class="toggle--off"><?php
1851 esc_html_e( 'No', 'adminify' );
1852 ?></span>
1853 </label>
1854 <span class="description">
1855 <?php
1856 esc_html_e( 'Remove Query Strings from Gravatar', 'adminify' );
1857 ?>
1858 </span>
1859 </td>
1860 </tr>
1861
1862
1863 </table>
1864
1865 <?php
1866 $this->next_step_buttons();
1867 ?>
1868 </form>
1869 <span>
1870 <?php
1871 esc_html_e( 'For more settings, check the plugin\'s ', 'adminify' );
1872 echo '"<a href="' . esc_url( admin_url( 'admin.php?page=wp-adminify-settings#tab=tweaks' ) ) . '" target="_blank">' ;
1873 esc_html_e( 'Tweaks Settings', 'adminify' );
1874 echo '</a>".' ;
1875 ?>
1876 </span>
1877 <?php
1878 }
1879
1880 public function setup_step_ready()
1881 {
1882 ?>
1883 <div class="final-step">
1884 <h1><?php
1885 esc_html_e( 'Your Site is Ready!', 'adminify' );
1886 ?></h1>
1887
1888 <div class="wp-adminify-sw-setup-next-steps">
1889 <div class="wp-adminify-sw-setup-next-steps-first">
1890 <h2><?php
1891 esc_html_e( 'Next Steps', 'adminify' );
1892 ?> &rarr;</h2>
1893 <a class="button button-primary button-large" href="<?php
1894 echo esc_url( admin_url( 'admin.php?page=wp-adminify-settings&adminify_setup_done_config=1' ) ) ;
1895 ?>">
1896 <?php
1897 esc_html_e( 'Go to WP Adminify Dashboard!', 'adminify' );
1898 ?>
1899 </a>
1900 </div>
1901 </div>
1902 </div>
1903 <?php
1904 }
1905
1906 }