mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 22:30:04 +00:00
Implement an aria-describedby attribute for login screen errors, and improve the "Forgot password?" anchor text.
Props aferica, rianrietveld Fixes #31143 git-svn-id: https://develop.svn.wordpress.org/trunk@31871 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -134,7 +134,7 @@ function wp_authenticate_username_password($user, $username, $password) {
|
||||
$user = get_user_by('login', $username);
|
||||
|
||||
if ( !$user )
|
||||
return new WP_Error( 'invalid_username', sprintf( __( '<strong>ERROR</strong>: Invalid username. <a href="%s">Lost your password</a>?' ), wp_lostpassword_url() ) );
|
||||
return new WP_Error( 'invalid_username', sprintf( __( '<strong>ERROR</strong>: Invalid username. <a href="%s">Lost your password?</a>' ), wp_lostpassword_url() ) );
|
||||
|
||||
/**
|
||||
* Filter whether the given user can be authenticated with the provided $password.
|
||||
@@ -150,7 +150,7 @@ function wp_authenticate_username_password($user, $username, $password) {
|
||||
return $user;
|
||||
|
||||
if ( !wp_check_password($password, $user->user_pass, $user->ID) )
|
||||
return new WP_Error( 'incorrect_password', sprintf( __( '<strong>ERROR</strong>: The password you entered for the username <strong>%1$s</strong> is incorrect. <a href="%2$s">Lost your password</a>?' ),
|
||||
return new WP_Error( 'incorrect_password', sprintf( __( '<strong>ERROR</strong>: The password you entered for the username <strong>%1$s</strong> is incorrect. <a href="%2$s">Lost your password?</a>' ),
|
||||
$username, wp_lostpassword_url() ) );
|
||||
|
||||
return $user;
|
||||
|
||||
Reference in New Issue
Block a user