mirror of
git://develop.git.wordpress.org/
synced 2025-03-23 21:39:50 +01:00
Login and Registration: Use correct variable to display a single error message.
When the `wp_login_errors` filter is used to add an error message followed by an instructional message, the former was not displayed and the latter was errouneously displayed twice above the login form. This commit ensures that the error message is displayed as expected. Follow-up to [56654]. Reviewed by jorbin. Merges [57142] to the 6.4 branch. Props mapumba, SergeyBiryukov. Fixes #59983. git-svn-id: https://develop.svn.wordpress.org/branches/6.4@57288 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
87dfd5514b
commit
08f27013d6
@ -257,7 +257,7 @@ function login_header( $title = 'Log In', $message = '', $wp_error = null ) {
|
||||
|
||||
$errors .= '</ul>';
|
||||
} else {
|
||||
$errors .= '<p>' . $error_message . '</p>';
|
||||
$errors .= '<p>' . $error_list[0] . '</p>';
|
||||
}
|
||||
|
||||
/**
|
||||
@ -265,9 +265,10 @@ function login_header( $title = 'Log In', $message = '', $wp_error = null ) {
|
||||
*
|
||||
* @since 2.1.0
|
||||
*
|
||||
* @param string $errors Login error message.
|
||||
* @param string $errors Login error messages.
|
||||
*/
|
||||
$errors = apply_filters( 'login_errors', $errors );
|
||||
|
||||
wp_admin_notice(
|
||||
$errors,
|
||||
array(
|
||||
@ -287,6 +288,7 @@ function login_header( $title = 'Log In', $message = '', $wp_error = null ) {
|
||||
* @param string $messages Login messages.
|
||||
*/
|
||||
$messages = apply_filters( 'login_messages', $messages );
|
||||
|
||||
wp_admin_notice(
|
||||
$messages,
|
||||
array(
|
||||
|
Loading…
x
Reference in New Issue
Block a user