Add `$user_login` and `$user_data` parameters to the `retrieve_password_message` filter.

Props ivankristianto, dcavins
Fixes #25853

Built from https://develop.svn.wordpress.org/trunk@30357


git-svn-id: http://core.svn.wordpress.org/trunk@30356 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
John Blackbourn 2014-11-16 07:25:22 +00:00
parent d88ed475b0
commit 066ee3b2b7
1 changed files with 7 additions and 3 deletions

View File

@ -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.') . "<br />\n" . __('Possible reason: your host may have disabled the mail() function.') );