| 1 |
<?php |
| 2 |
/** |
| 3 |
* Outputs the restricted content product code field |
| 4 |
* for the subscriber to enter their code if |
| 5 |
* they've already subscribed to the ConvertKit Product, |
| 6 |
* displayed within a modal. |
| 7 |
* |
| 8 |
* @package ConvertKit |
| 9 |
* @author ConvertKit |
| 10 |
*/ |
| 11 |
|
| 12 |
?> |
| 13 |
<h4><?php echo esc_html( WP_ConvertKit()->get_class( 'output_restrict_content' )->restrict_content_settings->get_by_key( 'email_check_heading' ) ); ?></h4> |
| 14 |
<p> |
| 15 |
<?php echo esc_html( WP_ConvertKit()->get_class( 'output_restrict_content' )->restrict_content_settings->get_by_key( 'email_check_text' ) ); ?> |
| 16 |
</p> |
| 17 |
|
| 18 |
<div class="convertkit-restrict-content-actions"> |
| 19 |
<form id="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"> |
| 20 |
<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' : '' ) ); ?>"> |
| 21 |
<input type="text" name="subscriber_code" id="convertkit_subscriber_code" inputmode="numeric" maxlength="6" pattern="[0-9]{6}" autocomplete="one-time-code" value="" required /> |
| 22 |
</div> |
| 23 |
|
| 24 |
<?php |
| 25 |
require 'notices.php'; |
| 26 |
?> |
| 27 |
|
| 28 |
<div> |
| 29 |
<input type="hidden" name="token" value="<?php echo esc_attr( WP_ConvertKit()->get_class( 'output_restrict_content' )->token ); ?>" /> |
| 30 |
<input type="hidden" name="convertkit_post_id" value="<?php echo esc_attr( WP_ConvertKit()->get_class( 'output_restrict_content' )->post_id ); ?>" /> |
| 31 |
<?php wp_nonce_field( 'convertkit_restrict_content_subscriber_code' ); ?> |
| 32 |
</div> |
| 33 |
</form> |
| 34 |
</div> |