From 0adcbd0094cc6e402616222f5a6cd93396b17c40 Mon Sep 17 00:00:00 2001 From: John Blackbourn Date: Sun, 16 Nov 2014 07:24:39 +0000 Subject: [PATCH] Add `$user_login` and `$user_data` parameters to the `retrieve_password_message` filter. Props ivankristianto, dcavins Fixes #25853 git-svn-id: https://develop.svn.wordpress.org/trunk@30357 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-login.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/wp-login.php b/src/wp-login.php index fd97572e51..ffd50e68ea 100644 --- a/src/wp-login.php +++ b/src/wp-login.php @@ -384,15 +384,19 @@ function retrieve_password() { * @param string $title Default email title. */ $title = apply_filters( 'retrieve_password_title', $title ); + /** * Filter the message body of the password reset mail. * * @since 2.8.0 + * @since 4.1.0 Added `$user_login` and `$user_data` parameters. * - * @param string $message Default mail message. - * @param string $key The activation key. + * @param string $message Default mail message. + * @param string $key The activation key. + * @param string $user_login The username for the user. + * @param WP_User $user_data WP_User object. */ - $message = apply_filters( 'retrieve_password_message', $message, $key ); + $message = apply_filters( 'retrieve_password_message', $message, $key, $user_login, $user_data ); if ( $message && !wp_mail( $user_email, wp_specialchars_decode( $title ), $message ) ) wp_die( __('The e-mail could not be sent.') . "
\n" . __('Possible reason: your host may have disabled the mail() function.') );