[wp-trac] [WordPress Trac] #59983: wp-login.php: login messages/errors
WordPress Trac
noreply at wordpress.org
Wed Nov 29 06:39:42 UTC 2023
#59983: wp-login.php: login messages/errors
------------------------------------+-----------------------------
Reporter: mapumba | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Login and Registration | Version: trunk
Severity: normal | Keywords:
Focuses: |
------------------------------------+-----------------------------
When using the following code:
{{{#!php
<?php
add_filter( 'wp_login_errors', function( $errors ) {
$errors->add(
'test_error',
'Error Test'
);
$errors->add(
'test_message',
'Message Test',
'message' // This is not an error..
);
return $errors;
}, 10 );
}}}
It only shows the "Message Test". This is because the variable
"$error_message" in wp-login.php is used to display the message if there
is only one error. But in this example the variable contains the Text of
the Message and not the Error Message.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/59983>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list