| 1 |
<?php |
| 2 |
|
| 3 |
// Exit if accessed directly. |
| 4 |
if ( ! defined( 'ABSPATH' ) ) { |
| 5 |
exit; |
| 6 |
} |
| 7 |
|
| 8 |
/** |
| 9 |
* The template used to display the login fields. |
| 10 |
* |
| 11 |
* @author WP Charitable LLC |
| 12 |
* @since 1.0.0 |
| 13 |
* @version 1.8.9.1 |
| 14 |
* @version 1.8.8.6 |
| 15 |
*/ |
| 16 |
|
| 17 |
$charitable_form = charitable_get_current_donation_form(); |
| 18 |
$charitable_account_fields = $charitable_form->get_user_account_fields(); |
| 19 |
$charitable_user = wp_get_current_user(); |
| 20 |
|
| 21 |
if ( 0 !== $charitable_user->ID ) { |
| 22 |
return; |
| 23 |
} |
| 24 |
|
| 25 |
if ( empty( $charitable_account_fields ) ) { |
| 26 |
return; |
| 27 |
} |
| 28 |
?> |
| 29 |
<div class="charitable-login-details"> |
| 30 |
<h4 class="charitable-form-header"><?php esc_html_e( 'Login Details', 'charitable' ); ?></h4> |
| 31 |
<p class="charitable-description"><?php esc_html_e( 'When you make your donation, a new donor account will be created for you.', 'charitable' ); ?></p> |
| 32 |
<?php |
| 33 |
/** |
| 34 |
* @hook charitable_donation_form_before_login_fields |
| 35 |
*/ |
| 36 |
do_action( 'charitable_donation_form_before_login_fields' ); |
| 37 |
|
| 38 |
foreach ( $charitable_account_fields as $charitable_key => $charitable_field ) : |
| 39 |
|
| 40 |
do_action( 'charitable_donation_form_user_field', $charitable_field, $charitable_key, $charitable_form ); |
| 41 |
|
| 42 |
endforeach; |
| 43 |
|
| 44 |
/** |
| 45 |
* @hook charitable_donation_form_after_login_fields |
| 46 |
*/ |
| 47 |
do_action( 'charitable_donation_form_after_login_fields' ); |
| 48 |
?> |
| 49 |
</div> |
| 50 |
|