wppaste
WordPress

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.10
  • 6.8.11
  • 6.9.10
  • 7.0.7
  • 7.1.3

Present in every tracked release (6.7.10 to 7.1.3).

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:1782wpmu_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.10 through 7.1.3.

  1. 6.7.10
  2. 6.8.11
  3. 6.9.10
  4. 7.0.7
  5. 7.1.3

Signature, return type and hooks compared across 5 parsed releases.

About this page

Parsed data
Generated from the wordpress-develop 6.9.10 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.