wpmu_welcome_notification
Filters whether to bypass the welcome email sent to the site administrator after site activation.
Returning false disables the welcome email.
Использование
add_filter( 'wpmu_welcome_notification', 'wp_kama_wpmu_welcome_notification_filter', 10, 5 ); /** * Function for `wpmu_welcome_notification` filter-hook. * * @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. * * @return int|false */ function wp_kama_wpmu_welcome_notification_filter( $blog_id, $user_id, $password, $title, $meta ){ // filter... return $blog_id; }
- $blog_id(int|false)
- Site ID, or false to prevent the email from sending.
- $user_id(int)
- User ID of the site administrator.
- $password(строка)
- User password, or "N/A" if the user account is not new.
- $title(строка)
- Site title.
- $meta(массив)
- Signup meta data. By default, contains the requested privacy setting and lang_id.
Список изменений
С версии 3.0.0 | Введена. |
Где вызывается хук
wp-includes/ms-functions.php 1614
if ( ! apply_filters( 'wpmu_welcome_notification', $blog_id, $user_id, $password, $title, $meta ) ) {