| 1 |
<?php |
| 2 |
/** |
| 3 |
* Outputs the content for the Restrict Content Setup Wizard > Setup step. |
| 4 |
* |
| 5 |
* @package ConvertKit |
| 6 |
* @author ConvertKit |
| 7 |
*/ |
| 8 |
|
| 9 |
?> |
| 10 |
|
| 11 |
<h1><?php esc_html_e( 'Landing Page', 'convertkit' ); ?></h1> |
| 12 |
<p> |
| 13 |
<?php |
| 14 |
esc_html_e( 'This will display a Kit landing page on the URL you specify on this WordPress web site.', 'convertkit' ); |
| 15 |
?> |
| 16 |
</p> |
| 17 |
|
| 18 |
<?php |
| 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() ) { |
| 24 |
?> |
| 25 |
<p> |
| 26 |
<?php |
| 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' ); |
| 28 |
?> |
| 29 |
</p> |
| 30 |
|
| 31 |
<div class="convertkit-setup-wizard-grid"> |
| 32 |
<div> |
| 33 |
<a href="<?php echo esc_url( convertkit_get_new_landing_page_url() ); ?>" target="_blank" class="button button-primary button-hero"> |
| 34 |
<?php esc_html_e( 'Create landing page', 'convertkit' ); ?> |
| 35 |
</a> |
| 36 |
</div> |
| 37 |
|
| 38 |
<div> |
| 39 |
<a href="<?php echo esc_url( $this->current_url ); ?>" class="button button-primary button-hero"> |
| 40 |
<?php esc_html_e( 'I\'ve created a landing page in Kit', 'convertkit' ); ?> |
| 41 |
</a> |
| 42 |
</div> |
| 43 |
</div> |
| 44 |
<?php |
| 45 |
} else { |
| 46 |
?> |
| 47 |
<hr /> |
| 48 |
<div> |
| 49 |
<label for="landing_page"><?php esc_html_e( 'Which landing page would you like to display?', 'convertkit' ); ?></label> |
| 50 |
<select name="landing_page" id="landing_page" class="convertkit-select2 widefat"> |
| 51 |
<?php |
| 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 |
| 56 |
} |
| 57 |
?> |
| 58 |
</select> |
| 59 |
</div> |
| 60 |
<div> |
| 61 |
<label for="post_name"><?php esc_html_e( 'Which permalink / slug should be assigned to this landing page?', 'convertkit' ); ?></label> |
| 62 |
<input type="text" name="post_name" id="post_name" placeholder="<?php esc_attr_e( 'my-landing-page', 'convertkit' ); ?>" class="widefat" required /> |
| 63 |
</div> |
| 64 |
|
| 65 |
<?php |
| 66 |
} |
| 67 |
|