beta-tester.php (2234B)
1 <?php 2 namespace Elementor; 3 4 if ( ! defined( 'ABSPATH' ) ) { 5 exit; // Exit if accessed directly 6 } 7 $user = wp_get_current_user(); 8 9 $ajax = Plugin::$instance->common->get_component( 'ajax' ); 10 11 $beta_tester_email = $user->user_email; 12 13 /** 14 * Print beta tester dialog. 15 * 16 * Display a dialog box to suggest the user to opt-in to the beta testers newsletter. 17 * 18 * Fired by `admin_footer` filter. 19 * 20 * @since 2.6.0 21 * @access public 22 */ 23 ?> 24 <script type="text/template" id="tmpl-elementor-beta-tester"> 25 <form id="elementor-beta-tester-form" method="post"> 26 <?php // PHPCS - This is a nonce, doesn't need to be escaped. ?> 27 <input type="hidden" name="_nonce" value="<?php echo $ajax->create_nonce(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>"> 28 <input type="hidden" name="action" value="elementor_beta_tester_signup" /> 29 <div id="elementor-beta-tester-form__caption"><?php echo esc_html__( 'Get Beta Updates', 'elementor' ); ?></div> 30 <div id="elementor-beta-tester-form__description"><?php echo esc_html__( 'As a beta tester, you’ll receive an update that includes a testing version of Elementor and its content directly to your Email', 'elementor' ); ?></div> 31 <div id="elementor-beta-tester-form__input-wrapper"> 32 <input id="elementor-beta-tester-form__email" name="beta_tester_email" type="email" placeholder="<?php echo esc_html__( 'Your Email', 'elementor' ); ?>" required value="<?php echo esc_html( $beta_tester_email ); ?>" /> 33 <button id="elementor-beta-tester-form__submit" class="elementor-button elementor-button-success"> 34 <span class="elementor-state-icon"> 35 <i class="eicon-loading eicon-animation-spin" aria-hidden="true"></i> 36 </span> 37 <?php echo esc_html__( 'Sign Up', 'elementor' ); ?> 38 </button> 39 </div> 40 <div id="elementor-beta-tester-form__terms"> 41 <?php // PHPCS - The content is escaped inside the sprintf. ?> 42 <?php echo sprintf( esc_html__( 'By clicking Sign Up, you agree to Elementor\'s <a href="%1$s">Terms of Service</a> and <a href="%2$s">Privacy Policy</a>', 'elementor' ), Beta_Testers::NEWSLETTER_TERMS_URL, Beta_Testers::NEWSLETTER_PRIVACY_URL ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?> 43 </div> 44 </form> 45 </script>