Make WordPress Core

Changeset 57142 for trunk


Ignore:
Timestamp:
11/29/2023 09:32:58 AM (10 months ago)
Author:
SergeyBiryukov
Message:

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].

Props mapumba.
Fixes #59983.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-login.php

    r56750 r57142  
    258258                $errors .= '</ul>';
    259259            } else {
    260                 $errors .= '<p>' . $error_message . '</p>';
     260                $errors .= '<p>' . $error_list[0] . '</p>';
    261261            }
    262262
     
    266266             * @since 2.1.0
    267267             *
    268              * @param string $errors Login error message.
     268             * @param string $errors Login error messages.
    269269             */
    270270            $errors = apply_filters( 'login_errors', $errors );
     271
    271272            wp_admin_notice(
    272273                $errors,
     
    288289             */
    289290            $messages = apply_filters( 'login_messages', $messages );
     291
    290292            wp_admin_notice(
    291293                $messages,
Note: See TracChangeset for help on using the changeset viewer.