Ticket #26156: wp-login.email.diff
File wp-login.email.diff, 4.0 KB (added by , 11 years ago) |
---|
-
wp-login.php
267 266 $errors = new WP_Error(); 268 267 269 268 if ( empty( $_POST['user_login'] ) ) { 270 $errors->add('empty_username', __('<strong>ERROR</strong>: Enter a username or e -mail address.'));269 $errors->add('empty_username', __('<strong>ERROR</strong>: Enter a username or email address.')); 271 270 } else if ( strpos( $_POST['user_login'], '@' ) ) { 272 271 $user_data = get_user_by( 'email', trim( $_POST['user_login'] ) ); 273 272 if ( empty( $user_data ) ) … … 288 287 return $errors; 289 288 290 289 if ( !$user_data ) { 291 $errors->add('invalidcombo', __('<strong>ERROR</strong>: Invalid username or e -mail.'));290 $errors->add('invalidcombo', __('<strong>ERROR</strong>: Invalid username or email.')); 292 291 return $errors; 293 292 } 294 293 … … 385 384 $message = apply_filters( 'retrieve_password_message', $message, $key ); 386 385 387 386 if ( $message && !wp_mail($user_email, $title, $message) ) 388 wp_die( __('The e -mail could not be sent.') . "<br />\n" . __('Possible reason: your host may have disabled the mail() function.') );387 wp_die( __('The email could not be sent.') . "<br />\n" . __('Possible reason: your host may have disabled the mail() function.') ); 389 388 390 389 return true; 391 390 } … … 520 519 521 520 <form name="lostpasswordform" id="lostpasswordform" action="<?php echo esc_url( site_url( 'wp-login.php?action=lostpassword', 'login_post' ) ); ?>" method="post"> 522 521 <p> 523 <label for="user_login" ><?php _e('Username or E -mail:') ?><br />522 <label for="user_login" ><?php _e('Username or Email:') ?><br /> 524 523 <input type="text" name="user_login" id="user_login" class="input" value="<?php echo esc_attr($user_login); ?>" size="20" /></label> 525 524 </p> 526 525 <?php … … 679 678 <input type="text" name="user_login" id="user_login" class="input" value="<?php echo esc_attr(wp_unslash($user_login)); ?>" size="20" /></label> 680 679 </p> 681 680 <p> 682 <label for="user_email"><?php _e('E -mail') ?><br />681 <label for="user_email"><?php _e('Email') ?><br /> 683 682 <input type="text" name="user_email" id="user_email" class="input" value="<?php echo esc_attr(wp_unslash($user_email)); ?>" size="25" /></label> 684 683 </p> 685 684 <?php 686 685 /** 687 * Fires following the 'E -mail' field in the user registration form.686 * Fires following the 'Email' field in the user registration form. 688 687 * 689 688 * @since 2.1.0 690 689 */ 691 690 do_action( 'register_form' ); 692 691 ?> 693 <p id="reg_passmail"><?php _e('A password will be e -mailed to you.') ?></p>692 <p id="reg_passmail"><?php _e('A password will be emailed to you.') ?></p> 694 693 <br class="clear" /> 695 694 <input type="hidden" name="redirect_to" value="<?php echo esc_attr( $redirect_to ); ?>" /> 696 695 <p class="submit"><input type="submit" name="wp-submit" id="wp-submit" class="button button-primary button-large" value="<?php esc_attr_e('Register'); ?>" /></p> … … 802 801 elseif ( isset($_GET['registration']) && 'disabled' == $_GET['registration'] ) 803 802 $errors->add('registerdisabled', __('User registration is currently not allowed.')); 804 803 elseif ( isset($_GET['checkemail']) && 'confirm' == $_GET['checkemail'] ) 805 $errors->add('confirm', __('Check your e -mail for the confirmation link.'), 'message');804 $errors->add('confirm', __('Check your email for the confirmation link.'), 'message'); 806 805 elseif ( isset($_GET['checkemail']) && 'newpass' == $_GET['checkemail'] ) 807 $errors->add('newpass', __('Check your e -mail for your new password.'), 'message');806 $errors->add('newpass', __('Check your email for your new password.'), 'message'); 808 807 elseif ( isset($_GET['checkemail']) && 'registered' == $_GET['checkemail'] ) 809 $errors->add('registered', __('Registration complete. Please check your e -mail.'), 'message');808 $errors->add('registered', __('Registration complete. Please check your email.'), 'message'); 810 809 elseif ( strpos( $redirect_to, 'about.php?updated' ) ) 811 810 $errors->add('updated', __( '<strong>You have successfully updated WordPress!</strong> Please log back in to experience the awesomeness.' ), 'message' ); 812 811 }