wp_send_new_user_notification_to_admin
Filters whether the admin is notified of a new user registration.
Usage
add_filter( 'wp_send_new_user_notification_to_admin', 'wp_kama_send_new_user_notification_to_admin_filter', 10, 2 ); /** * Function for `wp_send_new_user_notification_to_admin` filter-hook. * * @param bool $send Whether to send the email. * @param WP_User $user User object for new user. * * @return bool */ function wp_kama_send_new_user_notification_to_admin_filter( $send, $user ){ // filter... return $send; }
- $send(true|false)
- Whether to send the email.
Default: true - $user(WP_User)
- User object for new user.
Changelog
Since 6.1.0 | Introduced. |
Where the hook is called
wp_send_new_user_notification_to_admin
wp-includes/pluggable.php 2193
$send_notification_to_admin = apply_filters( 'wp_send_new_user_notification_to_admin', true, $user );