invited_user_email
Filters the contents of the email sent when an existing user is invited to join the site.
Использование
add_filter( 'invited_user_email', 'wp_kama_invited_user_email_filter', 10, 4 ); /** * Function for `invited_user_email` filter-hook. * * @param array $new_user_email Used to build wp_mail(). * @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 array */ function wp_kama_invited_user_email_filter( $new_user_email, $user_id, $role, $newuser_key ){ // filter... return $new_user_email; }
- $new_user_email(массив)
Used to build wp_mail().
-
to(строка)
The email address of the invited user. -
subject(строка)
The subject of the email. -
message(строка)
The content of the email. - headers(строка)
Headers.
-
- $user_id(int)
- The invited user's ID.
- $role(массив)
- Array containing role information for the invited user.
- $newuser_key(строка)
- The key of the invitation.
Список изменений
С версии 5.6.0 | Введена. |
Где вызывается хук
В файле: /wp-admin/user-new.php
invited_user_email
wp-admin/user-new.php 165
$new_user_email = apply_filters( 'invited_user_email', $new_user_email, $user_id, $role, $newuser_key );