| 1 |
<?php |
| 2 |
/** |
| 3 |
* The template used to display the login form. Provided here primarily as a way to make |
| 4 |
* it easier to override using theme templates. |
| 5 |
* |
| 6 |
* Override this template by copying it to yourtheme/charitable/shortcodes/login.php |
| 7 |
* |
| 8 |
* @author Eric Daams |
| 9 |
* @package Charitable/Templates/Account |
| 10 |
* @since 1.0.0 |
| 11 |
* @version 1.4.2 |
| 12 |
*/ |
| 13 |
|
| 14 |
if ( ! defined( 'ABSPATH' ) ) { exit; } // Exit if accessed directly |
| 15 |
|
| 16 |
$login_form_args = array_key_exists( 'login_form_args', $view_args ) ? $view_args['login_form_args'] : array(); |
| 17 |
|
| 18 |
?> |
| 19 |
<div class="charitable-login-form"> |
| 20 |
<?php |
| 21 |
|
| 22 |
/** |
| 23 |
* @hook charitable_login_form_before |
| 24 |
*/ |
| 25 |
do_action( 'charitable_login_form_before' ); |
| 26 |
|
| 27 |
wp_login_form( $login_form_args ); |
| 28 |
|
| 29 |
?> |
| 30 |
<p> |
| 31 |
<?php if ( array_key_exists( 'registration_link', $view_args ) && $view_args['registration_link'] ) : ?> |
| 32 |
<a href="<?php echo esc_url( $view_args['registration_link'] ) ?>"><?php echo $view_args['registration_link_text'] ?></a> | |
| 33 |
<?php endif ?> |
| 34 |
<a href="<?php echo esc_url( charitable_get_permalink( 'forgot_password_page' ) ) ?>"><?php _e( 'Forgot Password', 'charitable' ) ?></a> |
| 35 |
</p> |
| 36 |
<?php |
| 37 |
|
| 38 |
/** |
| 39 |
* @hook charitable_login_form_after |
| 40 |
*/ |
| 41 |
do_action( 'charitable_login_form_after' ) |
| 42 |
|
| 43 |
?> |
| 44 |
</div> |
| 45 |
|