Filters the contents of the reset password notification email sent to the user.
Parameters
$defaults
array- The default notification email arguments. Used to build wp_mail() .
to
stringThe intended recipient – user email address.subject
stringThe subject of the email.message
stringThe body of the email.headers
stringThe headers of the email.
$key
string- The activation key.
$user_login
string- The username for the user.
$user_data
WP_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
$defaults
variable is an array with all the necessary data that you can modify.