wpmu_welcome_notification

Filters whether to bypass the welcome email after site activation.

Description

apply_filters( 'wpmu_welcome_notification', (int|bool) $blog_id, (int) $user_id, (string) $password, (string) $title, (array) $meta ); 

Returning false disables the welcome email.

Parameters (5)

0. $blog_id (int|bool)
The blog id.
1. $user_id (int)
The user id.
2. $password (string)
User password.
3. $title (string)
Site title.
4. $meta (array)
Signup meta data.

Usage

To run the hook, copy the example below.
  1. $blog_id = apply_filters( 'wpmu_welcome_notification', $blog_id, $user_id, $password, $title, $meta ); 
  2.  
  3. if ( !empty( $blog_id ) ) { 
  4.  
  5. // everything has led up to this point... 
  6.  
  7.  
The following example is for adding a hook callback.
  1. // define the wpmu_welcome_notification callback 
  2. function filter_wpmu_welcome_notification( $blog_id, $user_id, $password, $title, $meta ) { 
  3. // make filter magic happen here... 
  4. return $blog_id
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( 'wpmu_welcome_notification', 'filter_wpmu_welcome_notification', 10, 5 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( 'wpmu_welcome_notification', 'filter_wpmu_welcome_notification', 10, 5 ); 

Defined (1)

The filter is defined in the following location(s).

/wp-includes/ms-functions.php  
  1. if ( ! apply_filters( 'wpmu_welcome_notification', $blog_id, $user_id, $password, $title, $meta ) )