emails
8 years ago
global
8 years ago
receipt
7 years ago
single-give-form
8 years ago
email-login-form.php
8 years ago
history-donations.php
8 years ago
payment-processing.php
8 years ago
shortcode-donor-wall.php
7 years ago
shortcode-form-grid.php
8 years ago
shortcode-goal.php
7 years ago
shortcode-login.php
8 years ago
shortcode-profile-editor.php
8 years ago
shortcode-receipt.php
7 years ago
shortcode-register.php
8 years ago
shortcode-totals-progress.php
8 years ago
single-give-form.php
8 years ago
shortcode-login.php
64 lines
| 1 | <?php |
| 2 | /** |
| 3 | * This template is used to display the login form with [give_login] |
| 4 | */ |
| 5 | |
| 6 | |
| 7 | if ( ! is_user_logged_in() ) { |
| 8 | |
| 9 | if ( ! empty( $_GET['payment_key'] ) ) { |
| 10 | $give_login_redirect = add_query_arg( 'payment_key', give_clean( $_GET['payment_key'] ) , give_get_history_page_uri() ); |
| 11 | } |
| 12 | |
| 13 | // Show any error messages after form submission |
| 14 | Give()->notices->render_frontend_notices( 0 ); ?> |
| 15 | <form id="give-login-form" class="give-form" action="" method="post"> |
| 16 | <fieldset> |
| 17 | <legend><?php _e( 'Log into Your Account', 'give' ); ?></legend> |
| 18 | <?php |
| 19 | /** |
| 20 | * Fires in the login shortcode, before the login fields. |
| 21 | * |
| 22 | * Allows you to add new fields before the default fields. |
| 23 | * |
| 24 | * @since 1.0 |
| 25 | */ |
| 26 | do_action( 'give_login_fields_before' ); |
| 27 | ?> |
| 28 | <div class="give-login-username give-login"> |
| 29 | <label for="give_user_login"><?php _e( 'Username', 'give' ); ?></label> |
| 30 | <input name="give_user_login" id="give_user_login" class="give-required give-input" type="text" required aria-required="true" /> |
| 31 | </div> |
| 32 | |
| 33 | <div class="give-login-password give-login"> |
| 34 | <label for="give_user_pass"><?php _e( 'Password', 'give' ); ?></label> |
| 35 | <input name="give_user_pass" id="give_user_pass" class="give-password give-required give-input" type="password" required aria-required="true" /> |
| 36 | </div> |
| 37 | |
| 38 | <div class="give-login-submit give-login"> |
| 39 | <input type="hidden" name="give_login_redirect" value="<?php echo esc_url( $give_login_redirect ); ?>" /> |
| 40 | <input type="hidden" name="give_login_nonce" value="<?php echo wp_create_nonce( 'give-login-nonce' ); ?>" /> |
| 41 | <input type="hidden" name="give_action" value="user_login" /> |
| 42 | <input id="give_login_submit" type="submit" class="give_submit" value="<?php _e( 'Log In', 'give' ); ?>" /> |
| 43 | </div> |
| 44 | |
| 45 | <div class="give-lost-password give-login"> |
| 46 | <a href="<?php echo wp_lostpassword_url(); ?>"><?php _e( 'Reset Password', 'give' ); ?></a> |
| 47 | </div> |
| 48 | <?php |
| 49 | /** |
| 50 | * Fires in the login shortcode, after the login fields. |
| 51 | * |
| 52 | * Allows you to add new fields after the default fields. |
| 53 | * |
| 54 | * @since 1.0 |
| 55 | */ |
| 56 | do_action( 'give_login_fields_after' ); |
| 57 | ?> |
| 58 | </fieldset> |
| 59 | </form> |
| 60 | <?php } elseif( isset( $_GET['give-login-success'] ) && true === (bool) $_GET['give-login-success'] ) { ?> |
| 61 | <?php Give()->notices->print_frontend_notice( apply_filters('give_successful_login_message', __( 'Login successful. Welcome!', 'give' )), true, 'success' ); ?> |
| 62 | <?php } else { ?> |
| 63 | <?php Give()->notices->print_frontend_notice( apply_filters('give_already_logged_in_message', sprintf( __( 'You are already logged in to the site. <a href="%s">Click here</a> to logout.', 'give' ), esc_url( $give_logout_redirect ) ) ), true, 'warning' ); ?> |
| 64 | <?php } ?> |