PluginProbe
Adminify – White Label, Admin Menu Editor, Login Customizer / 2.0.7
Adminify – White Label, Admin Menu Editor, Login Customizer v2.0.7
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 2.0.7, at Inc/Classes/Wizard/Adminify_Setup_Wizard.php

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