| 1 |
<?php |
| 2 |
/** |
| 3 |
* Outputs the subscriber code form, where the user can enter |
| 4 |
* the six digit code sent to their email after using the login |
| 5 |
* form, confirming they own the email address entered. |
| 6 |
* |
| 7 |
* @package ConvertKit |
| 8 |
* @author ConvertKit |
| 9 |
*/ |
| 10 |
|
| 11 |
?> |
| 12 |
|
| 13 |
<div id="convertkit-restrict-content"> |
| 14 |
<h4><?php echo esc_html( WP_ConvertKit()->get_class( 'output_restrict_content' )->restrict_content_settings->get_by_key( 'email_check_heading' ) ); ?></h4> |
| 15 |
<p> |
| 16 |
<?php echo esc_html( WP_ConvertKit()->get_class( 'output_restrict_content' )->restrict_content_settings->get_by_key( 'email_check_text' ) ); ?> |
| 17 |
</p> |
| 18 |
|
| 19 |
<div id="convertkit-restrict-content-form" class="convertkit-restrict-content-actions"> |
| 20 |
<form class="convertkit-restrict-content-form" action="<?php echo esc_attr( add_query_arg( array( 'convertkit_login' => 1 ), get_permalink( WP_ConvertKit()->get_class( 'output_restrict_content' )->post_id ) ) ); ?>" method="post"> |
| 21 |
<div id="convertkit-subscriber-code-container" class="<?php echo sanitize_html_class( ( is_wp_error( WP_ConvertKit()->get_class( 'output_restrict_content' )->error ) ? 'convertkit-restrict-content-error' : '' ) ); ?>"> |
| 22 |
<input type="text" name="subscriber_code" id="convertkit-subscriber-code" inputmode="numeric" maxlength="6" pattern="[0-9]{6}" autocomplete="one-time-code" value="" required /> |
| 23 |
</div> |
| 24 |
|
| 25 |
<?php |
| 26 |
require 'notices.php'; |
| 27 |
?> |
| 28 |
|
| 29 |
<div> |
| 30 |
<input type="submit" class="wp-block-button__link" value="<?php esc_html_e( 'Verify', 'convertkit' ); ?>" /> |
| 31 |
<input type="hidden" name="token" value="<?php echo esc_attr( WP_ConvertKit()->get_class( 'output_restrict_content' )->token ); ?>" /> |
| 32 |
<input type="hidden" name="convertkit_post_id" value="<?php echo esc_attr( $post_id ); ?>" /> |
| 33 |
<?php wp_nonce_field( 'convertkit_restrict_content_subscriber_code' ); ?> |
| 34 |
</div> |
| 35 |
</form> |
| 36 |
</div> |
| 37 |
</div> |
| 38 |
|