apply_filters( 'new_site_email', array $new_site_email, WP_Site $site, WP_User $user )
- Since
- 5.6.0
Filters the content of the email sent to the Multisite network administrator when a new site is created.
Description
Content should be formatted for transmission via wp_mail().
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
$new_site_emailarray- { Used to build wp_mail().
@type string $to The email address of the recipient.
@type string $subject The subject of the email.
@type string $message The content of the email.
@type string $headers Headers.
}$tostringThe email address of the recipient.$subjectstringThe subject of the email.$messagestringThe content of the email.$headersstringHeaders.
$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:1847wpmu_new_site_admin_notification()
Source code
* @type string $message The content of the email. * @type string $headers Headers. * } * @param WP_Site $site Site object of the new site. * @param WP_User $user User object of the administrator of the new site. */ $new_site_email = apply_filters( 'new_site_email', $new_site_email, $site, $user ); wp_mail( $new_site_email['to'], wp_specialchars_decode( $new_site_email['subject'] ), $new_site_email['message'], $new_site_email['headers']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 6.8.8 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.