wp_new_user_notification_email_admin filter-hookWP 4.9.0

Filters the contents of the new user notification email sent to the site admin.

Usage

add_filter( 'wp_new_user_notification_email_admin', 'wp_kama_new_user_notification_email_admin_filter', 10, 3 );

/**
 * Function for `wp_new_user_notification_email_admin` filter-hook.
 * 
 * @param array   $wp_new_user_notification_email_admin Used to build wp_mail().
 * @param WP_User $user                                 User object for new user.
 * @param string  $blogname                             The site title.
 *
 * @return array
 */
function wp_kama_new_user_notification_email_admin_filter( $wp_new_user_notification_email_admin, $user, $blogname ){

	// filter...
	return $wp_new_user_notification_email_admin;
}
$wp_new_user_notification_email_admin(array)

Used to build wp_mail().

  • to(string)
    The intended recipient - site admin email address.

  • subject(string)
    The subject of the email.

  • message(string)
    The body of the email.

  • headers(string)
    The headers of the email.
$user(WP_User)
User object for new user.
$blogname(string)
The site title.

Changelog

Since 4.9.0 Introduced.

Where the hook is called

wp_new_user_notification()
wp_new_user_notification_email_admin
wp-includes/pluggable.php 2148
$wp_new_user_notification_email_admin = apply_filters( 'wp_new_user_notification_email_admin', $wp_new_user_notification_email_admin, $user, $blogname );

Where the hook is used in WordPress

Usage not found.