retrieve_password_notification_email
Filters the contents of the reset password notification email sent to the user.
Usage
add_filter( 'retrieve_password_notification_email', 'wp_kama_retrieve_password_notification_email_filter', 10, 4 );
/**
* Function for `retrieve_password_notification_email` filter-hook.
*
* @param array $defaults The default notification email arguments. Used to build wp_mail().
* @param string $key The activation key.
* @param string $user_login The username for the user.
* @param WP_User $user_data WP_User object.
*
* @return array
*/
function wp_kama_retrieve_password_notification_email_filter( $defaults, $key, $user_login, $user_data ){
// filter...
return $defaults;
}
- $defaults(array)
The default notification email arguments. Used to build wp_mail().
-
to(string)
The intended recipient - user email address. -
subject(string)
The subject of the email. -
message(string)
The body of the email. - headers(string)
The headers of the email.
-
- $key(string)
- The activation key.
- $user_login(string)
- The username for the user.
- $user_data(WP_User)
- WP_User object.
Changelog
| Since 6.0.0 | Introduced. |
Where the hook is called
retrieve_password_notification_email
wp-includes/user.php 3412
$notification_email = apply_filters( 'retrieve_password_notification_email', $defaults, $key, $user_login, $user_data );