Diff: STRATO-apps/wordpress_03/app/wp-content/plugins/paid-memberships-pro/adminpages/wizard/wizard.php

Keine Baseline-Datei – Diff nur gegen leer.
Zur Liste
1 -
1 + <?php
2 + /**
3 + * Setup Wizard containing file that handles logic and loading of templates.
4 + */
5 + if ( empty( $_REQUEST['step'] ) ) {
6 + $previous_step = get_option( 'pmpro_wizard_step' );
7 + if ( ! empty( $previous_step ) ) {
8 + $active_step = sanitize_text_field( $previous_step );
9 + } else {
10 + $active_step = 'general';
11 + }
12 + } elseif ( ! empty( $_REQUEST['step'] ) ) {
13 + $active_step = sanitize_text_field( $_REQUEST['step'] );
14 + } else {
15 + $active_step = 'general';
16 + }
17 + ?>
18 + <div class="pmpro-wizard">
19 + <div class="pmpro-wizard__background"></div>
20 + <div class="pmpro-wizard__header">
21 + <h1><a class="pmpro_logo" target="_blank" rel="noopener noreferrer" href="https://www.paidmembershipspro.com/?utm_source=plugin&utm_medium=pmpro-admin-header&utm_campaign=homepage"><img src="<?php echo esc_url( PMPRO_URL . '/images/Paid-Memberships-Pro.png' ); ?>" width="350" height="75" border="0" alt="<?php esc_attr_e( 'Paid Memberships Pro', 'paid-memberships-pro' ); ?>" /></a></h1>
22 + <nav class="pmpro-stepper">
23 + <ul class="pmpro-stepper__steps">
24 + <?php
25 + $setup_steps = array(
26 + 'general' => __( 'General Info', 'paid-memberships-pro' ),
27 + 'payments' => __( 'Payments', 'paid-memberships-pro' ),
28 + 'memberships' => __( 'Memberships', 'paid-memberships-pro' ),
29 + 'advanced' => __( 'Advanced', 'paid-memberships-pro' ),
30 + 'done' => __( 'All Set!', 'paid-memberships-pro' ),
31 + );
32 +
33 + $count = 0;
34 + foreach ( $setup_steps as $setup_step => $name ) {
35 + // Build the selectors for the step based on wizard flow.
36 + $classes = array();
37 + $classes[] = 'pmpro-stepper__step';
38 + if ( $setup_step === $active_step ) {
39 + $classes[] = 'is-active';
40 + }
41 + $class = implode( ' ', array_unique( $classes ) );
42 + $count++;
43 + ?>
44 + <li class="<?php echo esc_attr( $class ); ?>">
45 + <a href="<?php echo esc_url( admin_url( 'admin.php?page=pmpro-wizard&step=' . $setup_step ) );?>">
46 + <div class="pmpro-stepper__step-icon">
47 + <span class="pmpro-stepper__step-number">
48 + <span class="screen-reader-text"><?php esc_html_e( 'Step', 'paid-memberships-pro' ); ?></span>
49 + <?php echo esc_html( $count ); ?>
50 + </span>
51 + </div>
52 + <span class="pmpro-stepper__step-label"<?php echo ( in_array( 'is-active', $classes ) ) ? ' aria-label="' . sprintf( esc_html__( '%s Active Step', 'paid-memberships-pro' ), esc_html( $name ) ) . '"' : ''; ?>>
53 + <?php echo esc_html( $name ); ?>
54 + </span>
55 + </a>
56 + </li>
57 + <?php
58 + }
59 + ?>
60 + </ul>
61 + <div class="pmpro-stepper__step-divider"></div>
62 + </nav>
63 + </div>
64 +
65 + <div class="pmpro-wizard__container">
66 + <?php
67 + // Load the wizard page template based on the current step.
68 + if ( ! empty( $active_step ) && $setup_steps[$active_step] ) {
69 + include $active_step . '.php';
70 + } else {
71 + include 'general.php';
72 + }
73 +
74 + ?>
75 + <p class="pmpro-wizard__exit"><a href="<?php echo esc_url( admin_url( 'admin.php?page=pmpro-dashboard' ) ); ?>"><?php esc_html_e( 'Exit Wizard and Return to Dashboard', 'paid-memberships-pro' ); ?></a></p>
76 + </div> <!-- end pmpro-wizard__container -->
77 + </div> <!-- end pmpro-wizard -->
78 + <?php
79 +