PluginProbe
Polylang / 3.6.7
Polylang v3.6.7
3.8.9 3.8.8 3.8.7 3.8.6 3.8.5 3.8.4 3.8.3 2.7 2.7.0.1 2.7.1 2.7.2 2.7.3 2.7.4 2.8 2.8.1 2.8.2 2.8.3 2.8.4 2.9 2.9.1 2.9.2 3.0 3.0.1 3.0.2 3.0.3 All 233 releases
polylang / modules / wizard / view-wizard-page.php

view-wizard-page.php in Polylang 3.6.7, at modules/wizard/view-wizard-page.php

109 lines 3.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Displays the wizard
4 *
5 * @package Polylang
6 *
7 * @since 2.7
8 */
9
10 if ( ! defined( 'ABSPATH' ) ) {
11 exit; // Don't access directly.
12 }
13 $admin_body_class = array( 'pll-wizard', 'wp-core-ui' );
14 if ( is_rtl() ) {
15 $admin_body_class[] = 'rtl';
16 }
17 ?>
18 <!DOCTYPE html>
19 <html <?php language_attributes(); ?>>
20 <head>
21 <meta name="viewport" content="width=device-width" />
22 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
23 <title>
24 <?php
25 printf(
26 /* translators: %s is the plugin name */
27 esc_html__( '%s &rsaquo; Setup', 'polylang' ),
28 esc_html( POLYLANG )
29 );
30 ?>
31 </title>
32 <script>
33 var ajaxurl = '<?php echo esc_url( admin_url( 'admin-ajax.php', 'relative' ) ); ?>';
34 </script>
35 <?php do_action( 'admin_enqueue_scripts' ); ?>
36 <?php wp_print_scripts( $this->steps[ $this->step ]['scripts'] ); ?>
37 <?php wp_print_styles( array_merge( $this->styles, $this->steps[ $this->step ]['styles'] ) ); ?>
38 <?php do_action( 'admin_head' ); ?>
39 </head>
40 <body class="<?php echo join( ' ', array_map( 'sanitize_key', $admin_body_class ) ); ?>">
41 <h1 id="pll-logo">
42 <a href="https://polylang.pro/" class="title">
43 <span><img src="<?php echo esc_url( plugins_url( '/modules/wizard/images/polylang-logo.png', POLYLANG_FILE ) ); ?>" /></span>
44 <?php echo esc_html( POLYLANG ); ?>
45 </a>
46 </h1>
47 <ol class="pll-wizard-steps">
48 <?php
49 foreach ( $this->steps as $step_key => $step ) {
50 $is_completed = array_search( $this->step, array_keys( $this->steps ), true ) > array_search( $step_key, array_keys( $this->steps ), true );
51
52 if ( $step_key === $this->step ) {
53 ?>
54 <li class="active"><?php echo esc_html( $step['name'] ); ?></li>
55 <?php
56 } elseif ( $is_completed ) {
57 ?>
58 <li class="done">
59 <a
60 href="<?php echo esc_url( add_query_arg( 'step', $step_key, remove_query_arg( 'activate_error' ) ) ); ?>"
61 >
62 <?php echo esc_html( $step['name'] ); ?>
63 </a>
64 </li>
65 <?php
66 } else {
67 ?>
68 <li><?php echo esc_html( $step['name'] ); ?></li>
69 <?php
70 }
71 }
72 ?>
73 </ol>
74 <div class="pll-wizard-content">
75 <form method="post" class="<?php echo esc_attr( "{$this->step}-step" ); ?>">
76 <?php
77 wp_nonce_field( 'pll-wizard', '_pll_nonce' );
78
79 if ( ! empty( $this->steps[ $this->step ]['view'] ) ) {
80 call_user_func( $this->steps[ $this->step ]['view'], $this );
81 }
82 ?>
83 <?php if ( 'last' !== $this->step ) : ?>
84 <p class="pll-wizard-actions step">
85 <button
86 type="submit"
87 class="button-primary button button-large button-next"
88 value="continue"
89 name="save_step"
90 >
91 <?php esc_html_e( 'Continue', 'polylang' ); ?><span class="dashicons dashicons-arrow-right-alt2"></span>
92 </button>
93 </p>
94 <?php endif; ?>
95 </form>
96 </div>
97 <div class="pll-wizard-footer">
98 <?php if ( 'last' !== $this->step ) : ?>
99 <a
100 class="pll-wizard-footer-links"
101 href="<?php echo esc_url( admin_url() ); ?>"
102 >
103 <?php esc_html_e( 'Not right now', 'polylang' ); ?>
104 </a>
105 <?php endif; ?>
106 </div>
107 </body>
108 </html>
109