# welcome_user_msg_filter()

URL: https://chugunov.pro/api-wordpress/functions/welcome_user_msg_filter/
Проверено на WordPress 6.9, обновлено 06.08.2026.
Источник: независимый русскоязычный справочник chugunov.pro. Не является официальной документацией WordPress.

Тип: функция.
Появился в версии: MU (3.0.0).

## Сигнатура

```php
welcome_user_msg_filter( string $text ): string
```

## Описание

Гарантирует, что приветственное сообщение не пустое. В настоящее время не используется.

## Параметры

- `$text` `string` — обязательный

## Возвращаемое значение

`string`

## Исходный код

Файл: `wp-includes/ms-functions.php:2394`

```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;
}
```

## История изменений

- MU (3.0.0) — Introduced.

## Связанные

Использует: [`update_site_option`](https://chugunov.pro/api-wordpress/functions/update_site_option/), [`__`](https://chugunov.pro/api-wordpress/functions/__/), [`remove_filter`](https://chugunov.pro/api-wordpress/functions/remove_filter/).

Оригинал в официальной документации: https://developer.wordpress.org/reference/functions/welcome_user_msg_filter/
