apply_filters( 'send_new_site_email', bool $send, WP_Site $site, WP_User $user )
- Since
- 5.6.0
Filters whether to send an email to the Multisite network administrator when a new site is created.
Description
Return false to disable sending the email.
Compatibility
- WordPress
- since 5.6.0
- 6.7.7
- 6.8.8
- 6.9.7
- 7.0.4
- 7.1.0
Present in every tracked release (6.7.7 to 7.1.0).
Parameters
$sendbool- Whether to send the email.
$siteWP_Site- Site object of the new site.
$userWP_User- User object of the administrator of the new site.
Where this hook fires · 1
wp-includes/ms-functions.php:1800wpmu_new_site_admin_notification()
Source code
* @since 5.6.0 * * @param bool $send Whether to send the email. * @param WP_Site $site Site object of the new site. * @param WP_User $user User object of the administrator of the new site. */ if ( ! apply_filters( 'send_new_site_email', true, $site, $user ) ) { return false; } $switched_locale = false; $network_admin = get_user_by( 'email', $email );Changelog
Introduced in 5.6.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
About this page
- Parsed data
- Generated from the wordpress-develop 7.1.0 tag, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
- Corrections
- Something wrong on this page? Report it and it gets fixed in the next regeneration.