Filters the contents of the reset password notification email sent to the user.
Parameters
$defaultsarray- The default notification email arguments. Used to build wp_mail() .
tostringThe intended recipient – user email address.subjectstringThe subject of the email.messagestringThe body of the email.headersstringThe headers of the email.
$keystring- The activation key.
$user_loginstring- The username for the user.
$user_dataWP_User- WP_User object.
Source
$notification_email = apply_filters( 'retrieve_password_notification_email', $defaults, $key, $user_login, $user_data );
Changelog
| Version | Description |
|---|---|
| 6.0.0 | Introduced. |
Here’s an example of how you can use this inside
functions.php:Inside the
$defaultsvariable is an array with all the necessary data that you can modify.