Login and Registration: Restore the "Error:" prefix for the "Unknown username" message.

This makes the message more consistent with other error messages related to authentication and registration.

Follow-up to [46417].

Props dd32.
See #52914, #52915.

git-svn-id: https://develop.svn.wordpress.org/trunk@50589 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov 2021-03-26 12:12:30 +00:00
parent 42b05c397c
commit 65b05ac3f2

View File

@ -149,7 +149,7 @@ function wp_authenticate_username_password( $user, $username, $password ) {
if ( ! $user ) {
return new WP_Error(
'invalid_username',
__( 'Unknown username. Check again or try your email address.' )
__( '<strong>Error</strong>: Unknown username. Check again or try your email address.' )
);
}
@ -347,12 +347,12 @@ function wp_authenticate_application_password( $input_user, $username, $password
if ( is_email( $username ) ) {
$error = new WP_Error(
'invalid_email',
__( 'Unknown email address. Check again or try your username.' )
__( '<strong>Error</strong>: Unknown email address. Check again or try your username.' )
);
} else {
$error = new WP_Error(
'invalid_username',
__( 'Unknown username. Check again or try your email address.' )
__( '<strong>Error</strong>: Unknown username. Check again or try your email address.' )
);
}
} elseif ( ! wp_is_application_passwords_available() ) {