wpmu_signup_blog_notification( string $domain, string $path, string $title, string $user_login, string $user_email, string $key, array $meta = array() ): bool
- Since
- MU (3.0.0)
- Source
wp-includes/ms-functions.php:942
Description
This is the notification function used when site registration is enabled.
Filter 'wpmu_signup_blog_notification' to bypass this function or replace it with your own notification behavior.
Filter 'wpmu_signup_blog_notification_email' and 'wpmu_signup_blog_notification_subject' to change the content and subject line of the email sent to newly registered users.
Compatibility
- WordPress
- since MU (3.0.0)
- PHP
- 7.4–8.6-dev
- 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), and compiles on PHP 7.4 through 8.6-dev.
Parameters
$domainstring- The new blog domain.
$pathstring- The new blog path.
$titlestring- The site title.
$user_loginstring- The user's login name.
$user_emailstring- The user's email address.
$keystring- The activation key created in wpmu_signup_blog().
$metaarrayoptional- Signup meta data. By default, contains the requested privacy setting and lang_id.Default:
array()
Return value
bool
Performance profile
How much work a call to wpmu_signup_blog_notification() does, and what it touches: the algorithmic scaling, the Zend instruction count per call across PHP versions, the hooks it hands control to, and the core code that calls it. Measured from the compiled opcodes, not a stopwatch, so every number is identical on any machine running the same PHP version, and every function in core is ranked by cost.
- Cost class
- Expensive
- Scaling
- Constant
- Instructions
- 19–153
- Plugin surface
- 3 hooks
- Called by
- 0
Sends mail via wp_mail().
No loop in the body: the same number of instructions runs whatever you pass in.
Executed per call on PHP 8.5, depending on the branch taken. The body compiles to 160.
Third-party callbacks on 'wpmu_signup_blog_notification', 'wpmu_signup_blog_notification_email', 'wpmu_signup_blog_notification_subject' run inside this call, and their cost is not bounded by anything here.
Nothing in core calls this; the cost is only what you spend yourself.
What it touches
- hookthird-party callbacks
apply_filters()called directly - optionnetwork option
get_site_option()called directly - querycontent query
get_user_by()called directly - mailsends mail
wp_mail()called directly - cacheobject cache
wp_cache_get()one call below wpmu_signup_blog_notification() - serializeserialisation
maybe_unserialize()one call below wpmu_signup_blog_notification()
Further down the call graph this can also reach transient. That is the worst case, several calls deep and usually down an error path, not what a normal call pays.
What one call costs · 49 distinct outcomes
One number would be a lie: the work depends on which branch runs. These are every distinct cost wpmu_signup_blog_notification() can have, taken from its control-flow graph on PHP 8.5.
| When | Instructions | Calls it makes |
|---|---|---|
!apply_filters() | 19 | apply_filters() |
apply_filters() && !is_subdomain_install() && $admin_email !== "" | 126 | apply_filters(), is_subdomain_install(), network_site_url(), esc_url(), get_site_option(), get_site_option(), get_option(), get_user_by(), __(), apply_filters(), esc_url(), sprintf(), _x(), apply_filters(), esc_url(), sprintf(), wp_specialchars_decode(), wp_mail() |
apply_filters() && !is_subdomain_install() && $admin_email !== "" | 128 | apply_filters(), is_subdomain_install(), network_site_url(), esc_url(), get_site_option(), get_site_option(), get_option(), get_user_by(), __(), apply_filters(), esc_url(), sprintf(), _x(), apply_filters(), esc_url(), sprintf(), wp_specialchars_decode(), wp_mail(), restore_previous_locale() |
apply_filters() && is_subdomain_install() && $admin_email !== "" | 129 | apply_filters(), is_subdomain_install(), get_current_network_id(), esc_url(), get_site_option(), get_site_option(), get_option(), get_user_by(), __(), apply_filters(), esc_url(), sprintf(), _x(), apply_filters(), esc_url(), sprintf(), wp_specialchars_decode(), wp_mail() |
apply_filters() && is_subdomain_install() && $admin_email !== "" | 130 | apply_filters(), is_subdomain_install(), get_current_network_id(), network_site_url(), esc_url(), get_site_option(), get_site_option(), get_option(), get_user_by(), __(), apply_filters(), esc_url(), sprintf(), _x(), apply_filters(), esc_url(), sprintf(), wp_specialchars_decode(), wp_mail() |
apply_filters() && is_subdomain_install() && $admin_email !== "" | 131 | apply_filters(), is_subdomain_install(), get_current_network_id(), esc_url(), get_site_option(), get_site_option(), get_option(), get_user_by(), __(), apply_filters(), esc_url(), sprintf(), _x(), apply_filters(), esc_url(), sprintf(), wp_specialchars_decode(), wp_mail(), restore_previous_locale() |
apply_filters() && !is_subdomain_install() && $admin_email !== "" | 132 | apply_filters(), is_subdomain_install(), network_site_url(), esc_url(), get_site_option(), get_site_option(), get_option(), get_user_by(), switch_to_user_locale(), __(), apply_filters(), esc_url(), sprintf(), _x(), apply_filters(), esc_url(), sprintf(), wp_specialchars_decode(), wp_mail() |
apply_filters() && is_subdomain_install() && $admin_email !== "" | 132 | apply_filters(), is_subdomain_install(), get_current_network_id(), network_site_url(), esc_url(), get_site_option(), get_site_option(), get_option(), get_user_by(), __(), apply_filters(), esc_url(), sprintf(), _x(), apply_filters(), esc_url(), sprintf(), wp_specialchars_decode(), wp_mail(), restore_previous_locale() |
apply_filters() && !is_subdomain_install() && $admin_email !== "" | 133 | apply_filters(), is_subdomain_install(), network_site_url(), esc_url(), get_site_option(), get_site_option(), get_site_option(), esc_html(), get_option(), get_user_by(), __(), apply_filters(), esc_url(), sprintf(), _x(), apply_filters(), esc_url(), sprintf(), wp_specialchars_decode(), wp_mail() |
apply_filters() && !is_subdomain_install() && $admin_email !== "" | 134 | apply_filters(), is_subdomain_install(), network_site_url(), esc_url(), get_site_option(), get_site_option(), get_option(), get_user_by(), switch_to_user_locale(), __(), apply_filters(), esc_url(), sprintf(), _x(), apply_filters(), esc_url(), sprintf(), wp_specialchars_decode(), wp_mail(), restore_previous_locale() |
apply_filters() && !is_subdomain_install() && $admin_email === "" | 134 | apply_filters(), is_subdomain_install(), network_site_url(), esc_url(), get_site_option(), network_home_url(), wp_parse_url(), get_site_option(), get_option(), get_user_by(), __(), apply_filters(), esc_url(), sprintf(), _x(), apply_filters(), esc_url(), sprintf(), wp_specialchars_decode(), wp_mail() |
apply_filters() && is_subdomain_install() && $admin_email !== "" | 135 | apply_filters(), is_subdomain_install(), get_current_network_id(), esc_url(), get_site_option(), get_site_option(), get_option(), get_user_by(), switch_to_user_locale(), __(), apply_filters(), esc_url(), sprintf(), _x(), apply_filters(), esc_url(), sprintf(), wp_specialchars_decode(), wp_mail() |
37 further outcomes, up to 153 instructions
apply_filters() && !is_subdomain_install() && $admin_email !== "" | 135 | apply_filters(), is_subdomain_install(), network_site_url(), esc_url(), get_site_option(), get_site_option(), get_site_option(), esc_html(), get_option(), get_user_by(), __(), apply_filters(), esc_url(), sprintf(), _x(), apply_filters(), esc_url(), sprintf(), wp_specialchars_decode(), wp_mail(), restore_previous_locale() |
apply_filters() && is_subdomain_install() && $admin_email !== "" | 136 | apply_filters(), is_subdomain_install(), get_current_network_id(), esc_url(), get_site_option(), get_site_option(), get_site_option(), esc_html(), get_option(), get_user_by(), __(), apply_filters(), esc_url(), sprintf(), _x(), apply_filters(), esc_url(), sprintf(), wp_specialchars_decode(), wp_mail() |
apply_filters() && is_subdomain_install() && $admin_email !== "" | 136 | apply_filters(), is_subdomain_install(), get_current_network_id(), network_site_url(), esc_url(), get_site_option(), get_site_option(), get_option(), get_user_by(), switch_to_user_locale(), __(), apply_filters(), esc_url(), sprintf(), _x(), apply_filters(), esc_url(), sprintf(), wp_specialchars_decode(), wp_mail() |
apply_filters() && !is_subdomain_install() && $admin_email === "" | 136 | apply_filters(), is_subdomain_install(), network_site_url(), esc_url(), get_site_option(), network_home_url(), wp_parse_url(), get_site_option(), get_option(), get_user_by(), __(), apply_filters(), esc_url(), sprintf(), _x(), apply_filters(), esc_url(), sprintf(), wp_specialchars_decode(), wp_mail(), restore_previous_locale() |
apply_filters() && is_subdomain_install() && $admin_email !== "" | 137 | apply_filters(), is_subdomain_install(), get_current_network_id(), esc_url(), get_site_option(), get_site_option(), get_option(), get_user_by(), switch_to_user_locale(), __(), apply_filters(), esc_url(), sprintf(), _x(), apply_filters(), esc_url(), sprintf(), wp_specialchars_decode(), wp_mail(), restore_previous_locale() |
apply_filters() && is_subdomain_install() && $admin_email === "" | 137 | apply_filters(), is_subdomain_install(), get_current_network_id(), esc_url(), get_site_option(), network_home_url(), wp_parse_url(), get_site_option(), get_option(), get_user_by(), __(), apply_filters(), esc_url(), sprintf(), _x(), apply_filters(), esc_url(), sprintf(), wp_specialchars_decode(), wp_mail() |
apply_filters() && is_subdomain_install() && $admin_email !== "" | 137 | apply_filters(), is_subdomain_install(), get_current_network_id(), network_site_url(), esc_url(), get_site_option(), get_site_option(), get_site_option(), esc_html(), get_option(), get_user_by(), __(), apply_filters(), esc_url(), sprintf(), _x(), apply_filters(), esc_url(), sprintf(), wp_specialchars_decode(), wp_mail() |
apply_filters() && is_subdomain_install() && $admin_email !== "" | 138 | apply_filters(), is_subdomain_install(), get_current_network_id(), esc_url(), get_site_option(), get_site_option(), get_site_option(), esc_html(), get_option(), get_user_by(), __(), apply_filters(), esc_url(), sprintf(), _x(), apply_filters(), esc_url(), sprintf(), wp_specialchars_decode(), wp_mail(), restore_previous_locale() |
apply_filters() && is_subdomain_install() && $admin_email !== "" | 138 | apply_filters(), is_subdomain_install(), get_current_network_id(), network_site_url(), esc_url(), get_site_option(), get_site_option(), get_option(), get_user_by(), switch_to_user_locale(), __(), apply_filters(), esc_url(), sprintf(), _x(), apply_filters(), esc_url(), sprintf(), wp_specialchars_decode(), wp_mail(), restore_previous_locale() |
apply_filters() && is_subdomain_install() && $admin_email === "" | 138 | apply_filters(), is_subdomain_install(), get_current_network_id(), network_site_url(), esc_url(), get_site_option(), network_home_url(), wp_parse_url(), get_site_option(), get_option(), get_user_by(), __(), apply_filters(), esc_url(), sprintf(), _x(), apply_filters(), esc_url(), sprintf(), wp_specialchars_decode(), wp_mail() |
apply_filters() && !is_subdomain_install() && $admin_email !== "" | 139 | apply_filters(), is_subdomain_install(), network_site_url(), esc_url(), get_site_option(), get_site_option(), get_site_option(), esc_html(), get_option(), get_user_by(), switch_to_user_locale(), __(), apply_filters(), esc_url(), sprintf(), _x(), apply_filters(), esc_url(), sprintf(), wp_specialchars_decode(), wp_mail() |
apply_filters() && is_subdomain_install() && $admin_email === "" | 139 | apply_filters(), is_subdomain_install(), get_current_network_id(), esc_url(), get_site_option(), network_home_url(), wp_parse_url(), get_site_option(), get_option(), get_user_by(), __(), apply_filters(), esc_url(), sprintf(), _x(), apply_filters(), esc_url(), sprintf(), wp_specialchars_decode(), wp_mail(), restore_previous_locale() |
apply_filters() && is_subdomain_install() && $admin_email !== "" | 139 | apply_filters(), is_subdomain_install(), get_current_network_id(), network_site_url(), esc_url(), get_site_option(), get_site_option(), get_site_option(), esc_html(), get_option(), get_user_by(), __(), apply_filters(), esc_url(), sprintf(), _x(), apply_filters(), esc_url(), sprintf(), wp_specialchars_decode(), wp_mail(), restore_previous_locale() |
apply_filters() && !is_subdomain_install() && $admin_email === "" | 140 | apply_filters(), is_subdomain_install(), network_site_url(), esc_url(), get_site_option(), network_home_url(), wp_parse_url(), get_site_option(), get_option(), get_user_by(), switch_to_user_locale(), __(), apply_filters(), esc_url(), sprintf(), _x(), apply_filters(), esc_url(), sprintf(), wp_specialchars_decode(), wp_mail() |
apply_filters() && is_subdomain_install() && $admin_email === "" | 140 | apply_filters(), is_subdomain_install(), get_current_network_id(), network_site_url(), esc_url(), get_site_option(), network_home_url(), wp_parse_url(), get_site_option(), get_option(), get_user_by(), __(), apply_filters(), esc_url(), sprintf(), _x(), apply_filters(), esc_url(), sprintf(), wp_specialchars_decode(), wp_mail(), restore_previous_locale() |
apply_filters() && !is_subdomain_install() && $admin_email !== "" | 141 | apply_filters(), is_subdomain_install(), network_site_url(), esc_url(), get_site_option(), get_site_option(), get_site_option(), esc_html(), get_option(), get_user_by(), switch_to_user_locale(), __(), apply_filters(), esc_url(), sprintf(), _x(), apply_filters(), esc_url(), sprintf(), wp_specialchars_decode(), wp_mail(), restore_previous_locale() |
apply_filters() && !is_subdomain_install() && $admin_email === "" | 141 | apply_filters(), is_subdomain_install(), network_site_url(), esc_url(), get_site_option(), network_home_url(), wp_parse_url(), get_site_option(), get_site_option(), esc_html(), get_option(), get_user_by(), __(), apply_filters(), esc_url(), sprintf(), _x(), apply_filters(), esc_url(), sprintf(), wp_specialchars_decode(), wp_mail() |
apply_filters() && is_subdomain_install() && $admin_email !== "" | 142 | apply_filters(), is_subdomain_install(), get_current_network_id(), esc_url(), get_site_option(), get_site_option(), get_site_option(), esc_html(), get_option(), get_user_by(), switch_to_user_locale(), __(), apply_filters(), esc_url(), sprintf(), _x(), apply_filters(), esc_url(), sprintf(), wp_specialchars_decode(), wp_mail() |
apply_filters() && !is_subdomain_install() && $admin_email === "" | 142 | apply_filters(), is_subdomain_install(), network_site_url(), esc_url(), get_site_option(), network_home_url(), wp_parse_url(), get_site_option(), get_option(), get_user_by(), switch_to_user_locale(), __(), apply_filters(), esc_url(), sprintf(), _x(), apply_filters(), esc_url(), sprintf(), wp_specialchars_decode(), wp_mail(), restore_previous_locale() |
apply_filters() && is_subdomain_install() && $admin_email === "" | 143 | apply_filters(), is_subdomain_install(), get_current_network_id(), esc_url(), get_site_option(), network_home_url(), wp_parse_url(), get_site_option(), get_option(), get_user_by(), switch_to_user_locale(), __(), apply_filters(), esc_url(), sprintf(), _x(), apply_filters(), esc_url(), sprintf(), wp_specialchars_decode(), wp_mail() |
apply_filters() && is_subdomain_install() && $admin_email !== "" | 143 | apply_filters(), is_subdomain_install(), get_current_network_id(), network_site_url(), esc_url(), get_site_option(), get_site_option(), get_site_option(), esc_html(), get_option(), get_user_by(), switch_to_user_locale(), __(), apply_filters(), esc_url(), sprintf(), _x(), apply_filters(), esc_url(), sprintf(), wp_specialchars_decode(), wp_mail() |
apply_filters() && !is_subdomain_install() && $admin_email === "" | 143 | apply_filters(), is_subdomain_install(), network_site_url(), esc_url(), get_site_option(), network_home_url(), wp_parse_url(), get_site_option(), get_site_option(), esc_html(), get_option(), get_user_by(), __(), apply_filters(), esc_url(), sprintf(), _x(), apply_filters(), esc_url(), sprintf(), wp_specialchars_decode(), wp_mail(), restore_previous_locale() |
apply_filters() && is_subdomain_install() && $admin_email !== "" | 144 | apply_filters(), is_subdomain_install(), get_current_network_id(), esc_url(), get_site_option(), get_site_option(), get_site_option(), esc_html(), get_option(), get_user_by(), switch_to_user_locale(), __(), apply_filters(), esc_url(), sprintf(), _x(), apply_filters(), esc_url(), sprintf(), wp_specialchars_decode(), wp_mail(), restore_previous_locale() |
apply_filters() && is_subdomain_install() && $admin_email === "" | 144 | apply_filters(), is_subdomain_install(), get_current_network_id(), esc_url(), get_site_option(), network_home_url(), wp_parse_url(), get_site_option(), get_site_option(), esc_html(), get_option(), get_user_by(), __(), apply_filters(), esc_url(), sprintf(), _x(), apply_filters(), esc_url(), sprintf(), wp_specialchars_decode(), wp_mail() |
apply_filters() && is_subdomain_install() && $admin_email === "" | 144 | apply_filters(), is_subdomain_install(), get_current_network_id(), network_site_url(), esc_url(), get_site_option(), network_home_url(), wp_parse_url(), get_site_option(), get_option(), get_user_by(), switch_to_user_locale(), __(), apply_filters(), esc_url(), sprintf(), _x(), apply_filters(), esc_url(), sprintf(), wp_specialchars_decode(), wp_mail() |
apply_filters() && is_subdomain_install() && $admin_email === "" | 145 | apply_filters(), is_subdomain_install(), get_current_network_id(), esc_url(), get_site_option(), network_home_url(), wp_parse_url(), get_site_option(), get_option(), get_user_by(), switch_to_user_locale(), __(), apply_filters(), esc_url(), sprintf(), _x(), apply_filters(), esc_url(), sprintf(), wp_specialchars_decode(), wp_mail(), restore_previous_locale() |
apply_filters() && is_subdomain_install() && $admin_email !== "" | 145 | apply_filters(), is_subdomain_install(), get_current_network_id(), network_site_url(), esc_url(), get_site_option(), get_site_option(), get_site_option(), esc_html(), get_option(), get_user_by(), switch_to_user_locale(), __(), apply_filters(), esc_url(), sprintf(), _x(), apply_filters(), esc_url(), sprintf(), wp_specialchars_decode(), wp_mail(), restore_previous_locale() |
apply_filters() && is_subdomain_install() && $admin_email === "" | 145 | apply_filters(), is_subdomain_install(), get_current_network_id(), network_site_url(), esc_url(), get_site_option(), network_home_url(), wp_parse_url(), get_site_option(), get_site_option(), esc_html(), get_option(), get_user_by(), __(), apply_filters(), esc_url(), sprintf(), _x(), apply_filters(), esc_url(), sprintf(), wp_specialchars_decode(), wp_mail() |
apply_filters() && is_subdomain_install() && $admin_email === "" | 146 | apply_filters(), is_subdomain_install(), get_current_network_id(), esc_url(), get_site_option(), network_home_url(), wp_parse_url(), get_site_option(), get_site_option(), esc_html(), get_option(), get_user_by(), __(), apply_filters(), esc_url(), sprintf(), _x(), apply_filters(), esc_url(), sprintf(), wp_specialchars_decode(), wp_mail(), restore_previous_locale() |
apply_filters() && is_subdomain_install() && $admin_email === "" | 146 | apply_filters(), is_subdomain_install(), get_current_network_id(), network_site_url(), esc_url(), get_site_option(), network_home_url(), wp_parse_url(), get_site_option(), get_option(), get_user_by(), switch_to_user_locale(), __(), apply_filters(), esc_url(), sprintf(), _x(), apply_filters(), esc_url(), sprintf(), wp_specialchars_decode(), wp_mail(), restore_previous_locale() |
apply_filters() && !is_subdomain_install() && $admin_email === "" | 147 | apply_filters(), is_subdomain_install(), network_site_url(), esc_url(), get_site_option(), network_home_url(), wp_parse_url(), get_site_option(), get_site_option(), esc_html(), get_option(), get_user_by(), switch_to_user_locale(), __(), apply_filters(), esc_url(), sprintf(), _x(), apply_filters(), esc_url(), sprintf(), wp_specialchars_decode(), wp_mail() |
apply_filters() && is_subdomain_install() && $admin_email === "" | 147 | apply_filters(), is_subdomain_install(), get_current_network_id(), network_site_url(), esc_url(), get_site_option(), network_home_url(), wp_parse_url(), get_site_option(), get_site_option(), esc_html(), get_option(), get_user_by(), __(), apply_filters(), esc_url(), sprintf(), _x(), apply_filters(), esc_url(), sprintf(), wp_specialchars_decode(), wp_mail(), restore_previous_locale() |
apply_filters() && !is_subdomain_install() && $admin_email === "" | 149 | apply_filters(), is_subdomain_install(), network_site_url(), esc_url(), get_site_option(), network_home_url(), wp_parse_url(), get_site_option(), get_site_option(), esc_html(), get_option(), get_user_by(), switch_to_user_locale(), __(), apply_filters(), esc_url(), sprintf(), _x(), apply_filters(), esc_url(), sprintf(), wp_specialchars_decode(), wp_mail(), restore_previous_locale() |
apply_filters() && is_subdomain_install() && $admin_email === "" | 150 | apply_filters(), is_subdomain_install(), get_current_network_id(), esc_url(), get_site_option(), network_home_url(), wp_parse_url(), get_site_option(), get_site_option(), esc_html(), get_option(), get_user_by(), switch_to_user_locale(), __(), apply_filters(), esc_url(), sprintf(), _x(), apply_filters(), esc_url(), sprintf(), wp_specialchars_decode(), wp_mail() |
apply_filters() && is_subdomain_install() && $admin_email === "" | 151 | apply_filters(), is_subdomain_install(), get_current_network_id(), network_site_url(), esc_url(), get_site_option(), network_home_url(), wp_parse_url(), get_site_option(), get_site_option(), esc_html(), get_option(), get_user_by(), switch_to_user_locale(), __(), apply_filters(), esc_url(), sprintf(), _x(), apply_filters(), esc_url(), sprintf(), wp_specialchars_decode(), wp_mail() |
apply_filters() && is_subdomain_install() && $admin_email === "" | 152 | apply_filters(), is_subdomain_install(), get_current_network_id(), esc_url(), get_site_option(), network_home_url(), wp_parse_url(), get_site_option(), get_site_option(), esc_html(), get_option(), get_user_by(), switch_to_user_locale(), __(), apply_filters(), esc_url(), sprintf(), _x(), apply_filters(), esc_url(), sprintf(), wp_specialchars_decode(), wp_mail(), restore_previous_locale() |
apply_filters() && is_subdomain_install() && $admin_email === "" | 153 | apply_filters(), is_subdomain_install(), get_current_network_id(), network_site_url(), esc_url(), get_site_option(), network_home_url(), wp_parse_url(), get_site_option(), get_site_option(), esc_html(), get_option(), get_user_by(), switch_to_user_locale(), __(), apply_filters(), esc_url(), sprintf(), _x(), apply_filters(), esc_url(), sprintf(), wp_specialchars_decode(), wp_mail(), restore_previous_locale() |
Across PHP versions
| PHP | Compiled | Executed | Branches | Notes |
|---|---|---|---|---|
| 8.6-dev | 159 | 19–152 | 7 | 1 fewer instruction than PHP 8.5 |
| 8.5 | 160 | 19–153 | 7 | |
| 8.4 | 160 | 19–153 | 7 | |
| 8.3 | 160 | 19–153 | 7 | |
| 8.2 | 160 | 19–153 | 7 | |
| 8.1 | 160 | 19–153 | 7 | |
| 7.4 | 160 | 19–153 | 7 |
An instruction is not a fixed amount of time, so a matching count is not necessarily the same speed; what it rules out is a difference in the work itself.
Hooks and filters fired · 3
3 hooks fire while wpmu_signup_blog_notification() runs, in this order:
- apply_filters( wpmu_signup_blog_notification )filterline 965 (+23 into the body)
Filters whether to bypass the new site email notification.
- apply_filters( wpmu_signup_blog_notification_email )filterline 1007 (+65 into the body)
Filters the message content of the new blog notification email.
- apply_filters( wpmu_signup_blog_notification_subject )filterline 1039 (+97 into the body)
Filters the subject of the new blog notification email.
Uses · 17
- apply_filters()Calls the callback functions that have been added to a filter hook.
- is_subdomain_install()Whether a subdomain configuration is enabled.
- get_current_network_id()Retrieves the current network ID.
- network_site_url()Retrieves the site URL for the current network.
- esc_url()Checks and cleans a URL.
- get_site_option()Retrieve an option value for the current network based on name of option.
- wp_parse_url()A wrapper for PHP's parse_url() function that handles consistency in the return values across PHP versions.
- network_home_url()Retrieves the home URL for the current network.
- esc_html()Escaping for HTML blocks.
- get_option()Retrieves an option value based on an option name.
- get_user_by()Retrieves user info by a given field.
- switch_to_user_locale()Switches the translations according to the given user's locale.
Show all 17
- __()Retrieves the translation of $text.
- _x()Retrieves translated string with gettext context.
- wp_mail()Sends an email, similar to PHP's mail function.
- wp_specialchars_decode()Converts a number of HTML entities into their special characters.
- restore_previous_locale()Restores the translations according to the previous locale.
Source code
function wpmu_signup_blog_notification( $domain, $path, $title, $user_login, $user_email, #[\SensitiveParameter] $key, $meta = array()) { /** * Filters whether to bypass the new site email notification. * * @since MU (3.0.0) * * @param string|false $domain Site domain, or false to prevent the email from sending. * @param string $path Site path. * @param string $title Site title. * @param string $user_login User login name. * @param string $user_email User email address. * @param string $key Activation key created in wpmu_signup_blog(). * @param array $meta Signup meta data. By default, contains the requested privacy setting and lang_id. */ if ( ! apply_filters( 'wpmu_signup_blog_notification', $domain, $path, $title, $user_login, $user_email, $key, $meta ) ) { return false; } // Send email with activation link. if ( ! is_subdomain_install() || get_current_network_id() !== 1 ) { $activate_url = network_site_url( "wp-activate.php?key=$key" ); } else { $activate_url = "http://{$domain}{$path}wp-activate.php?key=$key"; // @todo Use *_url() API. } $activate_url = esc_url( $activate_url ); $admin_email = get_site_option( 'admin_email' ); if ( '' === $admin_email ) { $admin_email = 'support@' . wp_parse_url( network_home_url(), PHP_URL_HOST ); } $from_name = ( '' !== get_site_option( 'site_name' ) ) ? esc_html( get_site_option( 'site_name' ) ) : 'WordPress'; $message_headers = "From: \"{$from_name}\" <{$admin_email}>\n" . 'Content-Type: text/plain; charset="' . get_option( 'blog_charset' ) . "\"\n"; $user = get_user_by( 'login', $user_login ); $switched_locale = $user && switch_to_user_locale( $user->ID ); $message = sprintf( /** * Filters the message content of the new blog notification email. * * Content should be formatted for transmission via wp_mail(). * * @since MU (3.0.0) * * @param string $content Content of the notification email. * @param string $domain Site domain. * @param string $path Site path. * @param string $title Site title. * @param string $user_login User login name. * @param string $user_email User email address. * @param string $key Activation key created in wpmu_signup_blog(). * @param array $meta Signup meta data. By default, contains the requested privacy setting and lang_id. */ apply_filters( 'wpmu_signup_blog_notification_email', /* translators: New site notification email. 1: Activation URL, 2: New site URL. */ __( "To activate your site, please click the following link:\n\n%1\$s\n\nAfter you activate, you will receive *another email* with your login.\n\nAfter you activate, you can visit your site here:\n\n%2\$s" ), $domain, $path, $title, $user_login, $user_email, $key, $meta ), $activate_url, esc_url( "http://{$domain}{$path}" ), $keyChangelog
Introduced in MU (3.0.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, from
src/wp-includes/ms-functions.php, 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.