| 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.5.7 |
| 12 |
*/ |
| 13 |
|
| 14 |
// Exit if accessed directly. |
| 15 |
if ( ! defined( 'ABSPATH' ) ) { exit; } |
| 16 |
|
| 17 |
$login_form_args = array_key_exists( 'login_form_args', $view_args ) ? $view_args['login_form_args'] : array(); |
| 18 |
|
| 19 |
?> |
| 20 |
<div class="charitable-login-form"> |
| 21 |
<?php |
| 22 |
|
| 23 |
/** |
| 24 |
* Do something before the login form. |
| 25 |
* |
| 26 |
* @param array $view_args All args passed to template. |
| 27 |
*/ |
| 28 |
do_action( 'charitable_login_form_before', $view_args ); |
| 29 |
|
| 30 |
wp_login_form( $login_form_args ); |
| 31 |
|
| 32 |
?> |
| 33 |
<p> |
| 34 |
<?php if ( array_key_exists( 'registration_link', $view_args ) && $view_args['registration_link'] ) : ?> |
| 35 |
<a href="<?php echo esc_url( $view_args['registration_link'] ) ?>"><?php echo $view_args['registration_link_text'] ?></a> | |
| 36 |
<?php endif ?> |
| 37 |
<a href="<?php echo esc_url( charitable_get_permalink( 'forgot_password_page' ) ) ?>"><?php _e( 'Forgot Password', 'charitable' ) ?></a> |
| 38 |
</p> |
| 39 |
<?php |
| 40 |
|
| 41 |
/** |
| 42 |
* Do something after showing the login form. |
| 43 |
* |
| 44 |
* @param array $view_args All args passed to template. |
| 45 |
*/ |
| 46 |
do_action( 'charitable_login_form_after', $view_args ) |
| 47 |
|
| 48 |
?> |
| 49 |
</div> |
| 50 |
|