wp_send_new_user_notification_to_admin хук-фильтрWP 6.1.0

Filters whether the admin is notified of a new user registration.

Использование

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.
По умолчанию: true
$user(WP_User)
User object for new user.

Список изменений

С версии 6.1.0 Введена.

Где вызывается хук

wp_new_user_notification()
wp_send_new_user_notification_to_admin
wp-includes/pluggable.php 2152
$send_notification_to_admin = apply_filters( 'wp_send_new_user_notification_to_admin', true, $user );

Где используется хук в WordPress

Использование не найдено.