wpmu_welcome_notification
Filter HookDescription
Filters whether to bypass the welcome email sent to the site administrator after site activation. Returning false disables the welcome email.Hook Information
File Location |
wp-includes/ms-functions.php
View on GitHub
|
Hook Type | Filter |
Line Number | 1660 |
Hook Parameters
Type | Name | Description |
---|---|---|
int|false
|
$blog_id
|
Site ID, or false to prevent the email from sending. |
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 wpmu_welcome_notification
add_filter('wpmu_welcome_notification', 'my_custom_filter', 10, 5);
function my_custom_filter($blog_id, $user_id, $password, $title, $meta) {
// Your custom filtering logic here
return $blog_id;
}
Source Code Context
wp-includes/ms-functions.php:1660
- How this hook is used in WordPress core
<?php
1655 * @param int $user_id User ID of the site administrator.
1656 * @param string $password User password, or "N/A" if the user account is not new.
1657 * @param string $title Site title.
1658 * @param array $meta Signup meta data. By default, contains the requested privacy setting and lang_id.
1659 */
1660 if ( ! apply_filters( 'wpmu_welcome_notification', $blog_id, $user_id, $password, $title, $meta ) ) {
1661 return false;
1662 }
1663
1664 $user = get_userdata( $user_id );
1665
PHP Documentation
<?php
/**
* Filters whether to bypass the welcome email sent to the site administrator after site activation.
*
* Returning false disables the welcome email.
*
* @since MU (3.0.0)
*
* @param int|false $blog_id Site ID, or false to prevent the email from sending.
* @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: 5
- File: wp-includes/ms-functions.php
Related Hooks
Related hooks will be displayed here in future updates.