← All changes
|
views/backend/setup-wizard/convertkit-landing-page-setup/content-start.php
+9
-13
3.3.7
→
3.4.6
View file →
| @@ -15,11 +15,13 @@ | ||
| 15 | 15 | ?> |
| 16 | 16 | </p> |
| 17 | 17 | |
| 18 | 18 | <?php |
| 19 | -// If no Landing Pages exist on the ConvertKit account, show the user how to add a Landing Page to ConvertKit, | |
| 20 | -// with an option to refresh this page so that they can then select the Landing Page. | |
| 21 | -if ( ! $this->landing_pages->exist() ) { | |
| 19 | +// If no non-legacy Landing Pages exist on the Kit account, show the user how to add | |
| 20 | +// one, with an option to refresh this page so that they can then select it. Legacy | |
| 21 | +// landing pages are intentionally excluded here; the wizard only offers v4 pages | |
| 22 | +// for new selections. | |
| 23 | +if ( ! $this->landing_pages->non_legacy_exist() ) { | |
| 22 | 24 | ?> |
| 23 | 25 | <p> |
| 24 | 26 | <?php |
| 25 | 27 | esc_html_e( 'To get started, you first need to create a landing page in Kit. Click the button below to get started.', 'convertkit' ); |
| @@ -46,18 +48,12 @@ | ||
| 46 | 48 | <div> |
| 47 | 49 | <label for="landing_page"><?php esc_html_e( 'Which landing page would you like to display?', 'convertkit' ); ?></label> |
| 48 | 50 | <select name="landing_page" id="landing_page" class="convertkit-select2 widefat"> |
| 49 | 51 | <?php |
| 50 | - foreach ( $this->landing_pages->get() as $landing_page ) { | |
| 51 | - if ( isset( $convertkit_landing_page['url'] ) ) { | |
| 52 | - ?> | |
| 53 | - <option value="<?php echo esc_attr( $landing_page['url'] ); ?>"><?php echo esc_attr( $landing_page['name'] ); ?></option> | |
| 54 | - <?php | |
| 55 | - } else { | |
| 56 | - ?> | |
| 57 | - <option value="<?php echo esc_attr( $landing_page['id'] ); ?>"><?php echo esc_attr( $landing_page['name'] ); ?></option> | |
| 58 | - <?php | |
| 59 | - } | |
| 52 | + foreach ( $this->landing_pages->get_non_legacy() as $landing_page ) { | |
| 53 | + ?> | |
| 54 | + <option value="<?php echo esc_attr( $landing_page['id'] ); ?>"><?php echo esc_attr( $landing_page['name'] ); ?></option> | |
| 55 | + <?php | |
| 60 | 56 | } |
| 61 | 57 | ?> |
| 62 | 58 | </select> |
| 63 | 59 | </div> |