new_site_email WordPress Filter Hook

The new_site_email hook is used to send an email to the administrator of a new WordPress site. This hook is triggered by the wp_insert_site function.

apply_filters( 'new_site_email', array $new_site_email, WP_Site $site, WP_User $user ) #

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().


Top ↑

Parameters

$new_site_email

(array)Used to build wp_mail().

  • 'to'
    (string) The email address of the recipient.
  • 'subject'
    (string) The subject of the email.
  • 'message'
    (string) The content of the email.
  • 'headers'
    (string) Headers.

$site

(WP_Site)Site object of the new site.

$user

(WP_User)User object of the administrator of the new site.


Top ↑

Source

File: wp-includes/ms-functions.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
5.6.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.

Show More
Show More