diff --git a/wp-login.php b/wp-login.php
index 90a7323c0..45ec88377 100644
--- a/wp-login.php
+++ b/wp-login.php
@@ -35,11 +35,21 @@ function login_header($title = 'Login', $message = '', $wp_error = '') {
}
if ( $wp_error->get_error_code() ) {
- $errors = "\n";
- foreach ( $wp_error->get_error_messages() as $error )
- $errors .= ' ' . $error . "
\n";
-
- echo '
' . apply_filters('login_errors', $errors) . "
\n";
+ $errors = '';
+ $messages = '';
+ foreach ( $wp_error->get_error_codes() as $code ) {
+ $severity = $wp_error->get_error_data($code);
+ foreach ( $wp_error->get_error_messages($code) as $error ) {
+ if ( 'message' == $severity )
+ $messages .= ' ' . $error . "
\n";
+ else
+ $errors .= ' ' . $error . "
\n";
+ }
+ }
+ if ( !empty($errors) )
+ echo '' . apply_filters('login_errors', $errors) . "
\n";
+ if ( !empty($messages) )
+ echo '' . apply_filters('login_messages', $messages) . "
\n";
}
} // End of login_header()
@@ -349,11 +359,11 @@ default:
$errors->add('test_cookie', __("ERROR: Cookies are blocked or not supported by your browser. You must enable cookies to use WordPress."));
// Some parts of this script use the main login form to display a message
- if ( isset($_GET['loggedout']) && TRUE == $_GET['loggedout'] ) $errors->add('loggedout', __('You are now logged out.'));
+ if ( isset($_GET['loggedout']) && TRUE == $_GET['loggedout'] ) $errors->add('loggedout', __('You are now logged out.'), 'message');
elseif ( isset($_GET['registration']) && 'disabled' == $_GET['registration'] ) $errors->add('registerdiabled', __('User registration is currently not allowed.'));
- elseif ( isset($_GET['checkemail']) && 'confirm' == $_GET['checkemail'] ) $errors->add('confirm', __('Check your e-mail for the confirmation link.'));
- elseif ( isset($_GET['checkemail']) && 'newpass' == $_GET['checkemail'] ) $errors->add('newpass', __('Check your e-mail for your new password.'));
- elseif ( isset($_GET['checkemail']) && 'registered' == $_GET['checkemail'] ) $errors->add('registered', __('Registration complete. Please check your e-mail.'));
+ elseif ( isset($_GET['checkemail']) && 'confirm' == $_GET['checkemail'] ) $errors->add('confirm', __('Check your e-mail for the confirmation link.'), 'message');
+ elseif ( isset($_GET['checkemail']) && 'newpass' == $_GET['checkemail'] ) $errors->add('newpass', __('Check your e-mail for your new password.'), 'message');
+ elseif ( isset($_GET['checkemail']) && 'registered' == $_GET['checkemail'] ) $errors->add('registered', __('Registration complete. Please check your e-mail.'), 'message');
login_header(__('Login'), '', $errors);
?>