| @@ -21,28 +21,38 @@ | ||
| 21 | 21 | do_action( 'admin_print_styles' ); |
| 22 | 22 | do_action( 'admin_head' ); |
| 23 | 23 | ?> |
| 24 | 24 | </head> |
| 25 | - <body class="wp-admin wp-core-ui convertkit"> | |
| 25 | + <body class="wp-admin wp-core-ui convertkit <?php echo esc_attr( $this->is_modal() ? ' convertkit-modal' : '' ); ?>"> | |
| 26 | 26 | <div id="convertkit-setup-wizard"> |
| 27 | - <header id="convertkit-setup-wizard-header"> | |
| 28 | - <h1><?php echo esc_html( CONVERTKIT_PLUGIN_NAME ); ?></h1> | |
| 29 | - </header> | |
| 27 | + <?php | |
| 28 | + if ( ! $this->is_modal() ) { | |
| 29 | + ?> | |
| 30 | + <header id="convertkit-setup-wizard-header"> | |
| 31 | + <h1><?php echo esc_html( CONVERTKIT_PLUGIN_NAME ); ?></h1> | |
| 32 | + </header> | |
| 33 | + <?php | |
| 34 | + } | |
| 35 | + ?> | |
| 30 | 36 | |
| 31 | 37 | <div class="wrap"> |
| 32 | - <div id="convertkit-setup-wizard-progress"> | |
| 33 | - <ol> | |
| 34 | - <?php | |
| 35 | - foreach ( $this->steps as $step_count => $step ) { | |
| 38 | + <?php | |
| 39 | + if ( ! $this->is_modal() ) { | |
| 40 | + ?> | |
| 41 | + <div id="convertkit-setup-wizard-progress"> | |
| 42 | + <ol> | |
| 43 | + <?php | |
| 44 | + foreach ( $this->steps as $step_count => $step ) { | |
| 45 | + ?> | |
| 46 | + <li class="step-<?php echo esc_attr( $step_count ); ?><?php echo ( $step_count <= $this->step ? ' done' : '' ); ?>"><?php echo esc_html( $step['name'] ); ?></li> | |
| 47 | + <?php | |
| 48 | + } | |
| 36 | 49 | ?> |
| 37 | - <li class="step-<?php echo esc_attr( $step_count ); ?><?php echo ( $step_count <= $this->step ? ' done' : '' ); ?>"><?php echo esc_html( $step['name'] ); ?></li> | |
| 38 | - <?php | |
| 39 | - } | |
| 40 | - ?> | |
| 41 | - </ol> | |
| 42 | - </div> | |
| 50 | + </ol> | |
| 51 | + </div> | |
| 52 | + <?php | |
| 53 | + } | |
| 43 | 54 | |
| 44 | - <?php | |
| 45 | 55 | // If an error occured, display an error notice. |
| 46 | 56 | if ( $this->error ) { |
| 47 | 57 | ?> |
| 48 | 58 | <div class="notice notice-error is-dismissible"> |
| @@ -56,14 +66,20 @@ | ||
| 56 | 66 | |
| 57 | 67 | <div id="convertkit-setup-wizard-body"> |
| 58 | 68 | <form action="<?php echo esc_attr( $this->next_step_url ); ?>" method="POST"> |
| 59 | 69 | <div id="convertkit-setup-wizard-content"> |
| 60 | - <div id="convertkit-setup-wizard-step"> | |
| 70 | + <?php | |
| 71 | + if ( ! $this->is_modal() ) { | |
| 72 | + ?> | |
| 73 | + <div id="convertkit-setup-wizard-step"> | |
| 74 | + <?php | |
| 75 | + printf( | |
| 76 | + /* translators: %1$s: Current Step, %2$s: Total Steps */ | |
| 77 | + esc_html__( 'Step %1$s of %2$s', 'convertkit' ), | |
| 78 | + esc_html( $this->step ), | |
| 79 | + esc_html( count( $this->steps ) ) | |
| 80 | + ); | |
| 81 | + ?> | |
| 82 | + </div> | |
| 61 | 83 | <?php |
| 62 | - echo sprintf( | |
| 63 | - /* translators: %1$s: Current Step, %2$s: Total Steps */ | |
| 64 | - esc_html__( 'Step %1$s of %2$s', 'convertkit' ), | |
| 65 | - esc_html( $this->step ), | |
| 66 | - esc_html( count( $this->steps ) ) | |
| 67 | - ); | |
| 68 | - ?> | |
| 69 | - </div> | |
| 84 | + } | |
| 85 | + ?> | |