From ae69878202c9f694997619a55c11d7c6c2d95848 Mon Sep 17 00:00:00 2001 From: John Blackbourn Date: Sat, 28 Jul 2018 13:01:30 +0000 Subject: [PATCH] Login and Registration: Pass the `$errors` parameter to the `lost_password` action. Props sebakurzyn Fixes #44512 git-svn-id: https://develop.svn.wordpress.org/trunk@43542 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-login.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 );