| @@ -1,65 +1,65 @@ | ||
| 1 | -<?php | |
| 2 | -/** | |
| 3 | - * Template for displaying global login form. | |
| 4 | - * | |
| 5 | - * This template can be overridden by copying it to yourtheme/learnpress/global/form-register.php. | |
| 6 | - * | |
| 7 | - * @author ThimPress | |
| 8 | - * @package Learnpress/Templates | |
| 9 | - * @version 4.0.1 | |
| 10 | - */ | |
| 11 | - | |
| 12 | -defined( 'ABSPATH' ) || exit(); | |
| 13 | - | |
| 14 | -if ( is_user_logged_in() ) { | |
| 15 | - return; | |
| 16 | -} | |
| 17 | -?> | |
| 18 | - | |
| 19 | -<div class="learn-press-form-register learn-press-form"> | |
| 20 | - | |
| 21 | - <h3><?php echo esc_html_x( 'Register', 'register-heading', 'learnpress' ); ?></h3> | |
| 22 | - | |
| 23 | - <?php do_action( 'learn-press/before-form-register' ); ?> | |
| 24 | - | |
| 25 | - <form name="learn-press-register" method="post" action=""> | |
| 26 | - | |
| 27 | - <ul class="form-fields"> | |
| 28 | - | |
| 29 | - <?php do_action( 'learn-press/before-form-register-fields' ); ?> | |
| 30 | - | |
| 31 | - <li class="form-field"> | |
| 32 | - <label for="reg_email"><?php esc_html_e( 'Email address', 'learnpress' ); ?> <span class="required">*</span></label> | |
| 33 | - <input id ="reg_email" name="reg_email" type="text" placeholder="<?php esc_attr_e( 'Email', 'learnpress' ); ?>" autocomplete="email" value="<?php echo esc_attr( LP_Helper::sanitize_params_submitted( $_POST['reg_email'] ?? '' ) ); ?>"> | |
| 34 | - </li> | |
| 35 | - <li class="form-field"> | |
| 36 | - <label for="reg_username"><?php esc_html_e( 'Username', 'learnpress' ); ?> <span class="required">*</span></label> | |
| 37 | - <input id ="reg_username" name="reg_username" type="text" placeholder="<?php esc_attr_e( 'Username', 'learnpress' ); ?>" autocomplete="username" value="<?php echo esc_attr( LP_Helper::sanitize_params_submitted( $_POST['reg_username'] ?? '' ) ); ?>"> | |
| 38 | - </li> | |
| 39 | - <li class="form-field"> | |
| 40 | - <label for="reg_password"><?php esc_html_e( 'Password', 'learnpress' ); ?> <span class="required">*</span></label> | |
| 41 | - <input id ="reg_password" name="reg_password" type="password" placeholder="<?php esc_attr_e( 'Password', 'learnpress' ); ?>" autocomplete="new-password"> | |
| 42 | - </li> | |
| 43 | - <li class="form-field"> | |
| 44 | - <label for="reg_password2"><?php esc_html_e( 'Confirm Password', 'learnpress' ); ?> <span class="required">*</span></label> | |
| 45 | - <input id ="reg_password2" name="reg_password2" type="password" placeholder="<?php esc_attr_e( 'Password', 'learnpress' ); ?>" autocomplete="off"> | |
| 46 | - </li> | |
| 47 | - | |
| 48 | - <?php do_action( 'learn-press/after-form-register-fields' ); ?> | |
| 49 | - </ul> | |
| 50 | - | |
| 51 | - <?php | |
| 52 | - do_action( 'register_form' ); | |
| 53 | - do_action( 'login_enqueue_scripts' ); | |
| 54 | - ?> | |
| 55 | - | |
| 56 | - <p> | |
| 57 | - <?php wp_nonce_field( 'learn-press-register', 'learn-press-register-nonce' ); ?> | |
| 58 | - <button type="submit"><?php esc_html_e( 'Register', 'learnpress' ); ?></button> | |
| 59 | - </p> | |
| 60 | - | |
| 61 | - </form> | |
| 62 | - | |
| 63 | - <?php do_action( 'learn-press/after-form-register' ); ?> | |
| 64 | - | |
| 65 | -</div> | |
| 1 | +<?php | |
| 2 | +/** | |
| 3 | + * Template for displaying global login form. | |
| 4 | + * | |
| 5 | + * This template can be overridden by copying it to yourtheme/learnpress/global/form-register.php. | |
| 6 | + * | |
| 7 | + * @author ThimPress | |
| 8 | + * @package Learnpress/Templates | |
| 9 | + * @version 4.0.1 | |
| 10 | + */ | |
| 11 | + | |
| 12 | +defined( 'ABSPATH' ) || exit(); | |
| 13 | + | |
| 14 | +if ( is_user_logged_in() ) { | |
| 15 | + return; | |
| 16 | +} | |
| 17 | +?> | |
| 18 | + | |
| 19 | +<div class="learn-press-form-register learn-press-form"> | |
| 20 | + | |
| 21 | + <h3><?php echo esc_html_x( 'Register', 'register-heading', 'learnpress' ); ?></h3> | |
| 22 | + | |
| 23 | + <?php do_action( 'learn-press/before-form-register' ); ?> | |
| 24 | + | |
| 25 | + <form name="learn-press-register" method="post" action=""> | |
| 26 | + | |
| 27 | + <ul class="form-fields"> | |
| 28 | + | |
| 29 | + <?php do_action( 'learn-press/before-form-register-fields' ); ?> | |
| 30 | + | |
| 31 | + <li class="form-field"> | |
| 32 | + <label for="reg_email"><?php esc_html_e( 'Email address', 'learnpress' ); ?> <span class="required">*</span></label> | |
| 33 | + <input id ="reg_email" name="reg_email" type="text" placeholder="<?php esc_attr_e( 'Email', 'learnpress' ); ?>" autocomplete="email" value="<?php echo esc_attr( LP_Helper::sanitize_params_submitted( $_POST['reg_email'] ?? '' ) ); ?>"> | |
| 34 | + </li> | |
| 35 | + <li class="form-field"> | |
| 36 | + <label for="reg_username"><?php esc_html_e( 'Username', 'learnpress' ); ?> <span class="required">*</span></label> | |
| 37 | + <input id ="reg_username" name="reg_username" type="text" placeholder="<?php esc_attr_e( 'Username', 'learnpress' ); ?>" autocomplete="username" value="<?php echo esc_attr( LP_Helper::sanitize_params_submitted( $_POST['reg_username'] ?? '' ) ); ?>"> | |
| 38 | + </li> | |
| 39 | + <li class="form-field"> | |
| 40 | + <label for="reg_password"><?php esc_html_e( 'Password', 'learnpress' ); ?> <span class="required">*</span></label> | |
| 41 | + <input id ="reg_password" name="reg_password" type="password" placeholder="<?php esc_attr_e( 'Password', 'learnpress' ); ?>" autocomplete="new-password"> | |
| 42 | + </li> | |
| 43 | + <li class="form-field"> | |
| 44 | + <label for="reg_password2"><?php esc_html_e( 'Confirm Password', 'learnpress' ); ?> <span class="required">*</span></label> | |
| 45 | + <input id ="reg_password2" name="reg_password2" type="password" placeholder="<?php esc_attr_e( 'Password', 'learnpress' ); ?>" autocomplete="off"> | |
| 46 | + </li> | |
| 47 | + | |
| 48 | + <?php do_action( 'learn-press/after-form-register-fields' ); ?> | |
| 49 | + </ul> | |
| 50 | + | |
| 51 | + <?php | |
| 52 | + do_action( 'register_form' ); | |
| 53 | + do_action( 'login_enqueue_scripts' ); | |
| 54 | + ?> | |
| 55 | + | |
| 56 | + <p> | |
| 57 | + <?php wp_nonce_field( 'learn-press-register', 'learn-press-register-nonce' ); ?> | |
| 58 | + <button type="submit"><?php esc_html_e( 'Register', 'learnpress' ); ?></button> | |
| 59 | + </p> | |
| 60 | + | |
| 61 | + </form> | |
| 62 | + | |
| 63 | + <?php do_action( 'learn-press/after-form-register' ); ?> | |
| 64 | + | |
| 65 | +</div> | |