Title: welcome_user_msg_filter
Published: April 25, 2014
Last modified: April 28, 2025

---

# welcome_user_msg_filter( string $text ): string

## In this article

 * [Parameters](https://developer.wordpress.org/reference/functions/welcome_user_msg_filter/?output_format=md#parameters)
 * [Return](https://developer.wordpress.org/reference/functions/welcome_user_msg_filter/?output_format=md#return)
 * [Source](https://developer.wordpress.org/reference/functions/welcome_user_msg_filter/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/functions/welcome_user_msg_filter/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/functions/welcome_user_msg_filter/?output_format=md#changelog)

[ Back to top](https://developer.wordpress.org/reference/functions/welcome_user_msg_filter/?output_format=md#wp--skip-link--target)

Ensures that the welcome message is not empty. Currently unused.

## 󠀁[Parameters](https://developer.wordpress.org/reference/functions/welcome_user_msg_filter/?output_format=md#parameters)󠁿

 `$text`stringrequired

## 󠀁[Return](https://developer.wordpress.org/reference/functions/welcome_user_msg_filter/?output_format=md#return)󠁿

 string

## 󠀁[Source](https://developer.wordpress.org/reference/functions/welcome_user_msg_filter/?output_format=md#source)󠁿

    ```php
    function welcome_user_msg_filter( $text ) {
    	if ( ! $text ) {
    		remove_filter( 'site_option_welcome_user_email', 'welcome_user_msg_filter' );

    		/* translators: Do not translate USERNAME, PASSWORD, LOGINLINK, SITE_NAME: those are placeholders. */
    		$text = __(
    			'Howdy USERNAME,

    Your new account is set up.

    You can log in with the following information:
    Username: USERNAME
    Password: PASSWORD
    LOGINLINK

    Thanks!

    --The Team @ SITE_NAME'
    		);
    		update_site_option( 'welcome_user_email', $text );
    	}
    	return $text;
    }
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-includes/ms-functions.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/6.9.4/src/wp-includes/ms-functions.php#L2394)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-includes/ms-functions.php#L2394-L2416)

## 󠀁[Related](https://developer.wordpress.org/reference/functions/welcome_user_msg_filter/?output_format=md#related)󠁿

| Uses | Description | 
| [update_site_option()](https://developer.wordpress.org/reference/functions/update_site_option/)`wp-includes/option.php` |

Updates the value of an option that was already added for the current network.

  | 
| [__()](https://developer.wordpress.org/reference/functions/__/)`wp-includes/l10n.php` |

Retrieves the translation of $text.

  | 
| [remove_filter()](https://developer.wordpress.org/reference/functions/remove_filter/)`wp-includes/plugin.php` |

Removes a callback function from a filter hook.

  |

[Show 1 more](https://developer.wordpress.org/reference/functions/welcome_user_msg_filter/?output_format=md#)
[Show less](https://developer.wordpress.org/reference/functions/welcome_user_msg_filter/?output_format=md#)

## 󠀁[Changelog](https://developer.wordpress.org/reference/functions/welcome_user_msg_filter/?output_format=md#changelog)󠁿

| Version | Description | 
| [MU (3.0.0)](https://developer.wordpress.org/reference/since/mu.3.0.0/) | Introduced. |

## User Contributed Notes

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Ffunctions%2Fwelcome_user_msg_filter%2F)
before being able to contribute a note or feedback.