invite_user
Fires immediately after an existing user is invited to join the site, but before the notification is sent.
Использование
add_action( 'invite_user', 'wp_kama_invite_user_action', 10, 3 ); /** * Function for `invite_user` action-hook. * * @param int $user_id The invited user's ID. * @param array $role Array containing role information for the invited user. * @param string $newuser_key The key of the invitation. * * @return void */ function wp_kama_invite_user_action( $user_id, $role, $newuser_key ){ // action... }
- $user_id(int)
- The invited user's ID.
- $role(массив)
- Array containing role information for the invited user.
- $newuser_key(строка)
- The key of the invitation.
Список изменений
С версии 4.4.0 | Введена. |
Где вызывается хук
В файле: /wp-admin/user-new.php
invite_user
wp-admin/user-new.php 113
do_action( 'invite_user', $user_id, $role, $newuser_key );