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

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