retrieve_password_notification_email filter-hookWP 6.0.0

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       $key        
 * @param       $user_login 
 * @param       $user_data  
 *
 * @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.
$key
-
$user_login
-
$user_data
-

Changelog

Since 6.0.0 Introduced.

Where the hook is called

retrieve_password()
retrieve_password_notification_email
wp-includes/user.php 3212
$notification_email = apply_filters( 'retrieve_password_notification_email', $defaults, $key, $user_login, $user_data );

Where the hook is used in WordPress

Usage not found.