wp_send_new_user_notification_to_user
Filters whether the user is notified of their new user registration.
Использование
add_filter( 'wp_send_new_user_notification_to_user', 'wp_kama_send_new_user_notification_to_filter', 10, 2 );
/**
* Function for `wp_send_new_user_notification_to_user` 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_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_send_new_user_notification_to_user
wp-includes/pluggable.php 2357
$send_notification_to_user = apply_filters( 'wp_send_new_user_notification_to_user', true, $user );