| @@ -5,12 +5,16 @@ | ||
| 5 | 5 | * This template can be overridden by copying it to yourtheme/learnpress/global/form-register.php. |
| 6 | 6 | * |
| 7 | 7 | * @author ThimPress |
| 8 | 8 | * @package Learnpress/Templates |
| 9 | - * @version 4.0.0 | |
| 9 | + * @version 4.0.1 | |
| 10 | 10 | */ |
| 11 | 11 | |
| 12 | 12 | defined( 'ABSPATH' ) || exit(); |
| 13 | + | |
| 14 | +if ( is_user_logged_in() ) { | |
| 15 | + return; | |
| 16 | +} | |
| 13 | 17 | ?> |
| 14 | 18 | |
| 15 | 19 | <div class="learn-press-form-register learn-press-form"> |
| 16 | 20 | |
| @@ -43,9 +47,12 @@ | ||
| 43 | 47 | |
| 44 | 48 | <?php do_action( 'learn-press/after-form-register-fields' ); ?> |
| 45 | 49 | </ul> |
| 46 | 50 | |
| 47 | - <?php do_action( 'register_form' ); ?> | |
| 51 | + <?php | |
| 52 | + do_action( 'register_form' ); | |
| 53 | + do_action( 'login_enqueue_scripts' ); | |
| 54 | + ?> | |
| 48 | 55 | |
| 49 | 56 | <p> |
| 50 | 57 | <?php wp_nonce_field( 'learn-press-register', 'learn-press-register-nonce' ); ?> |
| 51 | 58 | <button type="submit"><?php esc_html_e( 'Register', 'learnpress' ); ?></button> |