Filter hook 'update_welcome_email'

in WP Core File wp-includes/ms-functions.php at line 1712

View Source

update_welcome_email

Filter Hook
Description
Filters the content of the welcome email sent to the site administrator after site activation. Content should be formatted for transmission via wp_mail().

Hook Information

File Location wp-includes/ms-functions.php View on GitHub
Hook Type Filter
Line Number 1712

Hook Parameters

Type Name Description
string $welcome_email Message body of the email.
int $blog_id Site ID.
int $user_id User ID of the site administrator.
string $password User password, or "N/A" if the user account is not new.
string $title Site title.
array $meta Signup meta data. By default, contains the requested privacy setting and lang_id.

Usage Examples

Basic Usage
<?php
// Hook into update_welcome_email
add_filter('update_welcome_email', 'my_custom_filter', 10, 6);

function my_custom_filter($welcome_email, $blog_id, $user_id, $password, $title, $meta) {
    // Your custom filtering logic here
    return $welcome_email;
}

Source Code Context

wp-includes/ms-functions.php:1712 - How this hook is used in WordPress core
<?php
1707  	 * @param int    $user_id       User ID of the site administrator.
1708  	 * @param string $password      User password, or "N/A" if the user account is not new.
1709  	 * @param string $title         Site title.
1710  	 * @param array  $meta          Signup meta data. By default, contains the requested privacy setting and lang_id.
1711  	 */
1712  	$welcome_email = apply_filters( 'update_welcome_email', $welcome_email, $blog_id, $user_id, $password, $title, $meta );
1713  
1714  	$admin_email = get_site_option( 'admin_email' );
1715  
1716  	if ( '' === $admin_email ) {
1717  		$admin_email = 'support@' . wp_parse_url( network_home_url(), PHP_URL_HOST );

PHP Documentation

<?php
/**
	 * Filters the content of the welcome email sent to the site administrator after site activation.
	 *
	 * Content should be formatted for transmission via wp_mail().
	 *
	 * @since MU (3.0.0)
	 *
	 * @param string $welcome_email Message body of the email.
	 * @param int    $blog_id       Site ID.
	 * @param int    $user_id       User ID of the site administrator.
	 * @param string $password      User password, or "N/A" if the user account is not new.
	 * @param string $title         Site title.
	 * @param array  $meta          Signup meta data. By default, contains the requested privacy setting and lang_id.
	 */
Quick Info
  • Hook Type: Filter
  • Parameters: 6
  • File: wp-includes/ms-functions.php
Related Hooks

Related hooks will be displayed here in future updates.