new_site_email
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', 'wp_kama_new_site_email_filter', 10, 3 ); /** * Function for `new_site_email` filter-hook. * * @param array $new_site_email Used to build wp_mail(). * @param WP_Site $site Site object of the new site. * @param WP_User $user User object of the administrator of the new site. * * @return array */ function wp_kama_new_site_email_filter( $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 1800
$new_site_email = apply_filters( 'new_site_email', $new_site_email, $site, $user );