| @@ -1,37 +1,36 @@ | ||
| 1 | -<?php do_action('uwp_template_before', 'login'); ?> | |
| 1 | +<?php | |
| 2 | + | |
| 3 | +$button_title = uwp_get_option( 'login_form_button_title' ); | |
| 4 | +$button_title = $button_title | |
| 5 | + ? __( wp_unslash( $button_title ), 'userswp' ) | |
| 6 | + : __( 'Login', 'userswp' ); | |
| 7 | +$button_title = apply_filters( 'uwp_login_form_button_title', $button_title ); | |
| 8 | + | |
| 9 | +do_action('uwp_template_before', 'login'); ?> | |
| 2 | 10 | <div class="uwp-content-wrap"> |
| 3 | - <div class="uwp-login"> | |
| 4 | - <div class="uwp-lf-icon"><i class="fa fa-user fa-fw"></i></div> | |
| 11 | + <div class="uwp-login" <?php if(!empty($uwp_login_widget_args['form_padding'])){echo "style='padding:".absint($uwp_login_widget_args['form_padding'])."px'";}?>> | |
| 12 | + <div class="uwp-lf-icon"><i class="fas fa-user fa-fw"></i></div> | |
| 5 | 13 | <?php do_action('uwp_template_form_title_before', 'login'); ?> |
| 6 | - <h2><?php echo apply_filters('uwp_template_form_title', get_the_title(), 'login'); ?></h2> | |
| 14 | + <h2><?php | |
| 15 | + $form_title = ! empty( $args['form_title'] ) || ( isset($args['form_title']) && $args['form_title']=='0' ) ? esc_attr__( $args['form_title'], 'userswp' ) : __( 'Login', 'userswp' ); | |
| 16 | + echo apply_filters('uwp_template_form_title', $form_title, 'login'); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped | |
| 17 | + ?></h2> | |
| 7 | 18 | <?php do_action('uwp_template_display_notices', 'login'); ?> |
| 8 | 19 | <form class="uwp-login-form uwp_form" method="post"> |
| 9 | - <?php do_action('uwp_template_fields', 'login'); ?> | |
| 10 | - <input type="hidden" name="uwp_login_nonce" value="<?php echo wp_create_nonce( 'uwp-login-nonce' ); ?>" /> | |
| 11 | - <?php | |
| 12 | - if (is_uwp_login_page()) { | |
| 13 | - if (isset($_GET['redirect_to'])) { | |
| 14 | - $redirect_to = esc_url($_GET['redirect_to']); | |
| 15 | - } else if($referer = wp_get_referer()){ | |
| 16 | - $redirect_to = $referer; | |
| 17 | - } | |
| 18 | - } else { | |
| 19 | - $redirect_to = uwp_current_page_url(); | |
| 20 | - } | |
| 21 | - ?> | |
| 22 | - <input type="hidden" name="redirect_to" value="<?php echo $redirect_to; ?>"/> | |
| 23 | - <?php do_action('uwp_social_fields', 'login'); ?> | |
| 20 | + <?php do_action('uwp_template_fields', 'login', $args); ?> | |
| 24 | 21 | <div class="uwp-remember-me"> |
| 25 | - <label style="display: inline-block;" for="remember_me"> | |
| 26 | - <input name="remember_me" id="remember_me" value="forever" type="checkbox"> | |
| 22 | + <label style="display: inline-block;" for="remember_me<?php if(wp_doing_ajax()){echo "_ajax";}?>"> | |
| 23 | + <input name="remember_me" id="remember_me<?php if(wp_doing_ajax()){echo "_ajax";}?>" value="forever" type="checkbox"> | |
| 27 | 24 | <?php _e( 'Remember Me', 'userswp' ); ?> |
| 28 | 25 | </label> |
| 29 | 26 | </div> |
| 30 | - <input type="submit" name="uwp_login_submit" value="<?php _e( 'Login', 'userswp' ); ?>"> | |
| 27 | + <input type="submit" name="uwp_login_submit" value="<?php echo esc_html( $button_title ); ?>"> | |
| 31 | 28 | </form> |
| 32 | - <div class="uwp-forgotpsw"><a href="<?php echo uwp_get_page_link('forgot'); ?>"><?php _e( 'Forgot password?', 'userswp' ); ?></a></div> | |
| 33 | - <div class="clfx"></div> | |
| 34 | - <div class="uwp-register-now"><?php _e( 'Not a member?', 'userswp' ); ?> <a rel="nofollow" href="<?php echo uwp_get_page_link('register'); ?>"><?php _e( 'Create account', 'userswp' ); ?></a></div> | |
| 29 | + <div class="uwp-login-links"> | |
| 30 | + <div class="uwp-footer-link uwp-register-now"><?php esc_html_e( 'Not a member?', 'userswp' ); ?> <a rel="nofollow" href="<?php echo esc_url( uwp_get_register_page_url() ); ?>"><?php echo uwp_get_option("register_link_title") ? esc_html( uwp_get_option("register_link_title" ) ) : esc_html__( 'Create account', 'userswp' ); ?></a></div> | |
| 31 | + <div class="uwp-footer-link uwp-forgotpsw"><a rel="nofollow" href="<?php echo esc_url( uwp_get_forgot_page_url() ); ?>"><?php echo uwp_get_option("forgot_link_title") ? esc_html( uwp_get_option("forgot_link_title") ) : esc_html__( 'Forgot password?', 'userswp' ); ?></a></div> | |
| 32 | + </div> | |
| 33 | + <?php do_action('uwp_social_fields', 'login', $args); ?> | |
| 35 | 34 | </div> |
| 36 | 35 | </div> |
| 37 | 36 | <?php do_action('uwp_template_after', 'login'); ?> |