retrieve_password_message
Filters the message body of the password reset mail.
If the filtered message is empty, the password reset email will not be sent.
Usage
add_filter( 'retrieve_password_message', 'wp_kama_retrieve_password_message_filter', 10, 4 ); /** * Function for `retrieve_password_message` filter-hook. * * @param string $message Email message. * @param string $key The activation key. * @param string $user_login The username for the user. * @param WP_User $user_data WP_User object. * * @return string */ function wp_kama_retrieve_password_message_filter( $message, $key, $user_login, $user_data ){ // filter... return $message; }
- $message(string)
- Email message.
- $key(string)
- The activation key.
- $user_login(string)
- The username for the user.
- $user_data(WP_User)
- WP_User object.
Changelog
Since 2.8.0 | Introduced. |
Since 4.1.0 | Added $user_login and $user_data parameters. |
Where the hook is called
retrieve_password_message
wp-includes/user.php 3263
$message = apply_filters( 'retrieve_password_message', $message, $key, $user_login, $user_data );