PluginProbe
Adminify – White Label, Admin Menu Editor, Login Customizer / 3.2.4.1
Adminify – White Label, Admin Menu Editor, Login Customizer v3.2.4.1
4.3.2 4.3.1 4.3.0 4.2.26 4.2.25 4.2.24 4.2.23 4.2.22 4.2.21 4.2.20 4.2.19 4.2.18 4.2.17 4.2.16 4.2.15 4.2.14 4.2.13 4.2.12 4.2.11 4.2.10 4.2.9 4.2.8 4.2.7 4.2.6 4.2.5 All 165 releases
adminify / Inc / Classes / Wizard / Adminify_Setup_Wizard.php

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

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