| @@ -5,12 +5,16 @@ | ||
| 5 | 5 | * This template can be overridden by copying it to yourtheme/learnpress/global/form-login.php. |
| 6 | 6 | * |
| 7 | 7 | * @author ThimPress |
| 8 | 8 | * @package Learnpress/Templates |
| 9 | - * @version 4.0.0 | |
| 9 | + * @version 4.0.2 | |
| 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-login learn-press-form"> |
| 16 | 20 | |
| @@ -40,9 +44,12 @@ | ||
| 40 | 44 | <?php esc_html_e( 'Remember me', 'learnpress' ); ?> |
| 41 | 45 | </label> |
| 42 | 46 | </p> |
| 43 | 47 | |
| 44 | - <?php do_action( 'login_form' ); ?> | |
| 48 | + <?php | |
| 49 | + do_action( 'login_form' ); | |
| 50 | + do_action( 'login_enqueue_scripts' ); | |
| 51 | + ?> | |
| 45 | 52 | |
| 46 | 53 | <p> |
| 47 | 54 | <input type="hidden" name="learn-press-login-nonce" value="<?php echo wp_create_nonce( 'learn-press-login' ); ?>"> |
| 48 | 55 | <button type="submit"><?php esc_html_e( 'Login', 'learnpress' ); ?></button> |