Ticket #28528: wp-login-enhancements.diff
File wp-login-enhancements.diff, 4.2 KB (added by , 9 years ago) |
---|
-
wp-login.php
521 521 login_header(__('Lost Password'), '<p class="message">' . __('Please enter your username or email address. You will receive a link to create a new password via email.') . '</p>', $errors); 522 522 523 523 $user_login = isset($_POST['user_login']) ? wp_unslash($_POST['user_login']) : ''; 524 524 525 $user_or_email_field = '<input type="text" name="user_login" id="user_login" class="input" value="'. esc_attr($user_login) .'" size="20" />'; 526 $user_or_email_field = apply_filters( 'user_or_email_field', $user_or_email_field ); 525 527 ?> 526 528 527 529 <form name="lostpasswordform" id="lostpasswordform" action="<?php echo esc_url( network_site_url( 'wp-login.php?action=lostpassword', 'login_post' ) ); ?>" method="post"> 528 530 <p> 529 531 <label for="user_login" ><?php _e('Username or Email:') ?><br /> 530 < input type="text" name="user_login" id="user_login" class="input" value="<?php echo esc_attr($user_login); ?>" size="20" /></label>532 <?php echo $user_or_email_field; ?></label> 531 533 </p> 532 534 <?php 533 535 /** … … 616 618 617 619 ?> 618 620 <form name="resetpassform" id="resetpassform" action="<?php echo esc_url( network_site_url( 'wp-login.php?action=resetpass', 'login_post' ) ); ?>" method="post" autocomplete="off"> 621 622 <?php do_action( 'before_resetpass_form_fields' ); ?> 623 619 624 <input type="hidden" id="user_login" value="<?php echo esc_attr( $rp_login ); ?>" autocomplete="off" /> 620 625 621 626 <div class="user-pass1-wrap"> … … 710 715 */ 711 716 $redirect_to = apply_filters( 'registration_redirect', $registration_redirect ); 712 717 login_header(__('Registration Form'), '<p class="message register">' . __('Register For This Site') . '</p>', $errors); 718 719 $register_user_field = '<input type="text" name="user_login" id="user_login" class="input" value="'. esc_attr( wp_unslash( $user_login ) ) .'" size="20" />'; 720 $register_user_field = apply_filters( 'register_user_field', $register_user_field ); 721 722 $register_email_field = '<input type="email" name="user_email" id="user_email" class="input" value="' . esc_attr( wp_unslash( $user_email ) ) .'" size="25" />'; 723 $register_email_field = apply_filters( 'register_email_field', $register_email_field ); 713 724 ?> 714 725 715 726 <form name="registerform" id="registerform" action="<?php echo esc_url( wp_registration_url() ); ?>" method="post" novalidate="novalidate"> 727 728 <?php do_action( 'before_register_form_fields' ); ?> 729 716 730 <p> 717 731 <label for="user_login"><?php _e('Username') ?><br /> 718 < input type="text" name="user_login" id="user_login" class="input" value="<?php echo esc_attr(wp_unslash($user_login)); ?>" size="20" /></label>732 <?php echo $register_user_field; ?></label> 719 733 </p> 720 734 <p> 721 735 <label for="user_email"><?php _e('Email') ?><br /> 722 < input type="email" name="user_email" id="user_email" class="input" value="<?php echo esc_attr( wp_unslash( $user_email ) ); ?>" size="25" /></label>736 <?php echo $register_email_field; ?></label> 723 737 </p> 724 738 <?php 725 739 /** … … 876 890 } else { 877 891 $aria_describedby_error = ''; 878 892 } 893 894 $user_login_field = '<input type="text" name="log" id="user_login"'. $aria_describedby_error .' class="input" value="'. esc_attr( $user_login ). '" size="20" />'; 895 $user_login_field = apply_filters( 'user_login_field', $user_login_field ); 896 897 $user_pass_field = '<input type="password" name="pwd" id="user_pass"'. $aria_describedby_error .' class="input" value="" size="20" />'; 898 $user_pass_field = apply_filters( 'user_pass_field', $user_pass_field ); 879 899 ?> 880 900 881 901 <form name="loginform" id="loginform" action="<?php echo esc_url( wp_login_url() ); ?>" method="post"> 902 903 <?php do_action( 'before_login_form_fields' ); ?> 904 882 905 <p> 883 906 <label for="user_login"><?php _e('Username') ?><br /> 884 < input type="text" name="log" id="user_login"<?php echo $aria_describedby_error; ?> class="input" value="<?php echo esc_attr( $user_login ); ?>" size="20" /></label>907 <?php echo $user_login_field; ?></label> 885 908 </p> 886 909 <p> 887 910 <label for="user_pass"><?php _e('Password') ?><br /> 888 < input type="password" name="pwd" id="user_pass"<?php echo $aria_describedby_error; ?> class="input" value="" size="20" /></label>911 <?php echo $user_pass_field; ?></label> 889 912 </p> 890 913 <?php 891 914 /**