new_site_email хук-фильтр . WP 5.6.0
Filters the content of the email sent to the Multisite network administrator when a new site is created.
Content should be formatted for transmission via wp_mail().
Использование
add_filter( 'new_site_email', 'filter_function_name_890', 10, 3 ); function filter_function_name_890( $new_site_email, $site, $user ){ // filter... return $new_site_email; }
- $new_site_email(массив)
Used to build wp_mail().
-
to(строка)
The email address of the recipient. -
subject(строка)
The subject of the email. -
message(строка)
The content of the email. - headers(строка)
Headers.
-
- $site(WP_Site)
- Site object of the new site.
- $user(WP_User)
- User object of the administrator of the new site.
Список изменений
С версии 5.6.0 | Введена. |
Где вызывается хук
new_site_email
wp-includes/ms-functions.php 1796
$new_site_email = apply_filters( 'new_site_email', $new_site_email, $site, $user );