функция
since 4.4.0
wp_send_new_user_notifications()
Проверено на WordPress 6.9, обновлено Источник: WordPress Developer Resources.
Сигнатура
wp_send_new_user_notifications( int $user_id, string $notify = 'both' )
Описание
Уведомления отправляются как администратору сайта, так и вновь созданному пользователю.
Оригинал (английский)
Notifications are sent both to the site admin and to the newly created user.
Параметры
$user_id
int
обязательный
ID вновь созданного пользователя.
$notify
string
необязательный
= 'both'
Тип уведомления, которое должно произойти. Принимает 'admin' или пустую строку (только администратору), 'user' или 'both' (администратору и пользователю).
Значение по умолчанию — 'both'.
Исходный код
wp-includes/user.php:3660
function wp_send_new_user_notifications( $user_id, $notify = 'both' ) {
wp_new_user_notification( $user_id, null, $notify );
}
История изменений
| Версия | Описание |
|---|---|
| 4.6.0 | Converted the $notify parameter to accept 'user' for sending notifications only to the user created. |
| 4.4.0 | Introduced. |

