PluginProbe
Kit (formerly ConvertKit) – Email Newsletter, Email Marketing, Membership, Subscribers and Landing Pages / 3.4.3
Kit (formerly ConvertKit) – Email Newsletter, Email Marketing, Membership, Subscribers and Landing Pages v3.4.3
3.4.3 3.4.2 3.4.1 3.4.0 3.3.9 3.3.8 3.3.7 3.3.6 3.3.5 3.3.4 3.3.3 3.3.2 3.3.1 2.2.0 2.2.1 2.2.2 2.2.3 2.2.4 2.2.5 2.2.6 2.2.7 2.2.8 2.2.9 2.3.0 2.3.1 All 196 releases
convertkit / views / frontend / restrict-content / login-email.php

login-email.php in Kit (formerly ConvertKit) – Email Newsletter, Email Marketing, Membership, Subscribers and Landing Pages 3.4.3, at views/frontend/restrict-content/login-email.php

49 lines 2.6 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Outputs the restricted content product email field
4 * for the subscriber to enter their email address if
5 * they've already subscribed to the ConvertKit Product.
6 *
7 * @package ConvertKit
8 * @author ConvertKit
9 */
10
11 // Resource type and ID aren't defined when the Member Content Login block is used.
12 $resource_type = ( isset( $resource_type ) ? $resource_type : '' );
13 $resource_id = ( isset( $resource_id ) ? $resource_id : 0 );
14 ?>
15 <form id="convertkit-restrict-content-form" class="convertkit-restrict-content-form" action="<?php echo esc_attr( add_query_arg( array( 'convertkit_login' => 1 ), get_permalink( $post_id ) ) ); ?>#convertkit-restrict-content" method="post">
16 <div id="convertkit-restrict-content-email-field" class="<?php echo sanitize_html_class( ( is_wp_error( WP_ConvertKit()->get_class( 'output_restrict_content' )->error ) ? 'convertkit-restrict-content-error' : '' ) ); ?>">
17 <input type="email" name="convertkit_email" id="convertkit_email" value="" placeholder="<?php esc_attr_e( 'Email Address', 'convertkit' ); ?>" required />
18 <?php
19 // Output the submit button. If a spam protection provider is active
20 // it renders the button plus any accompanying widget div; otherwise a
21 // plain submit button is output.
22 $spam = new ConvertKit_Spam_Protection();
23 $spam_provider = $spam->get_active_provider();
24 if ( $spam_provider !== false ) {
25 echo $spam_provider->get_submit_button_html( // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
26 WP_ConvertKit()->get_class( 'output_restrict_content' )->restrict_content_settings->get_by_key( 'email_button_label' ),
27 'convertkit_member_content_login',
28 array( 'wp-block-button__link', 'wp-block-button__link' )
29 );
30 } else {
31 ?>
32 <input type="submit" class="wp-block-button__link wp-block-button__link" value="<?php echo esc_attr( WP_ConvertKit()->get_class( 'output_restrict_content' )->restrict_content_settings->get_by_key( 'email_button_label' ) ); ?>" />
33 <?php
34 }
35 ?>
36 <input type="hidden" name="convertkit_resource_type" value="<?php echo esc_attr( $resource_type ); ?>" />
37 <input type="hidden" name="convertkit_resource_id" value="<?php echo esc_attr( $resource_id ); ?>" />
38 <input type="hidden" name="convertkit_post_id" value="<?php echo esc_attr( $post_id ); ?>" />
39 <?php wp_nonce_field( 'convertkit_restrict_content_login' ); ?>
40 </div>
41 </form>
42
43 <?php
44 // Output notices.
45 require 'notices.php';
46 ?>
47
48 <small><?php echo esc_html( WP_ConvertKit()->get_class( 'output_restrict_content' )->restrict_content_settings->get_by_key( 'email_description_text' ) ); ?></small>
49