update_welcome_user_email
Filter HookDescription
Filters the content of the welcome email after user 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 | 1919 |
Hook Parameters
Type | Name | Description |
---|---|---|
string
|
$welcome_email
|
The message body of the account activation success email. |
int
|
$user_id
|
User ID. |
string
|
$password
|
User password. |
array
|
$meta
|
Signup meta data. Default empty array. |
Usage Examples
Basic Usage
<?php
// Hook into update_welcome_user_email
add_filter('update_welcome_user_email', 'my_custom_filter', 10, 4);
function my_custom_filter($welcome_email, $user_id, $password, $meta) {
// Your custom filtering logic here
return $welcome_email;
}
Source Code Context
wp-includes/ms-functions.php:1919
- How this hook is used in WordPress core
<?php
1914 * @param string $welcome_email The message body of the account activation success email.
1915 * @param int $user_id User ID.
1916 * @param string $password User password.
1917 * @param array $meta Signup meta data. Default empty array.
1918 */
1919 $welcome_email = apply_filters( 'update_welcome_user_email', $welcome_email, $user_id, $password, $meta );
1920 $welcome_email = str_replace( 'SITE_NAME', $current_network->site_name, $welcome_email );
1921 $welcome_email = str_replace( 'USERNAME', $user->user_login, $welcome_email );
1922 $welcome_email = str_replace( 'PASSWORD', $password, $welcome_email );
1923 $welcome_email = str_replace( 'LOGINLINK', wp_login_url(), $welcome_email );
1924
PHP Documentation
<?php
/**
* Filters the content of the welcome email after user activation.
*
* Content should be formatted for transmission via wp_mail().
*
* @since MU (3.0.0)
*
* @param string $welcome_email The message body of the account activation success email.
* @param int $user_id User ID.
* @param string $password User password.
* @param array $meta Signup meta data. Default empty array.
*/
Quick Info
- Hook Type: Filter
- Parameters: 4
- File: wp-includes/ms-functions.php
Related Hooks
Related hooks will be displayed here in future updates.