From 58509ba12fddca02d401b33482300064fb7cc18e Mon Sep 17 00:00:00 2001 From: John Blackbourn Date: Sat, 28 Jul 2018 13:02:25 +0000 Subject: [PATCH] Login and Registration: Pass the `$errors` parameter to the `lost_password` action. Props sebakurzyn Fixes #44512 Built from https://develop.svn.wordpress.org/trunk@43542 git-svn-id: http://core.svn.wordpress.org/trunk@43371 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/version.php | 2 +- wp-login.php | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/wp-includes/version.php b/wp-includes/version.php index 9b2112a57b..893cdaf811 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '5.0-alpha-43541'; +$wp_version = '5.0-alpha-43542'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. diff --git a/wp-login.php b/wp-login.php index b0117ed8fa..263a19637b 100644 --- a/wp-login.php +++ b/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 );