diff --git a/src/wp-login.php b/src/wp-login.php index b0117ed8fa..263a19637b 100644 --- a/src/wp-login.php +++ b/src/wp-login.php @@ -588,8 +588,12 @@ switch ( $action ) { * Fires before the lost password form. * * @since 1.5.1 + * @since 5.0.0 Added the `$errors` parameter. + * + * @param WP_Error $errors A `WP_Error` object containing any errors generated by using invalid + * credentials. Note that the error object may not contain any errors. */ - do_action( 'lost_password' ); + do_action( 'lost_password', $errors ); login_header( __( 'Lost Password' ), '

' . __( 'Please enter your username or email address. You will receive a link to create a new password via email.' ) . '

', $errors );