PluginProbe
Polylang / 2.7.3
Polylang v2.7.3
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 2.7.3, at modules/wizard/view-wizard-page.php

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