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

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

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