invited_user_email хук-фильтр . WP 5.6.0
Filters the contents of the email sent when an existing user is invited to join the site.
Использование
add_filter( 'invited_user_email', 'filter_function_name_9039', 10, 4 ); function filter_function_name_9039( $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(число)
- 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 159
$new_user_email = apply_filters( 'invited_user_email', $new_user_email, $user_id, $role, $newuser_key );