# wpmu_signup_blog_notification()

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

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

## Сигнатура

```php
wpmu_signup_blog_notification( string $domain, string $path, string $title, string $user_login, string $user_email, string $key, array $meta = array() ): bool
```

## Описание

Это функция уведомления, используемая, когда регистрация сайтов включена.
Используйте фильтр 'wpmu_signup_blog_notification', чтобы обойти эту функцию или заменить её собственным поведением уведомления.
Используйте фильтры 'wpmu_signup_blog_notification_email' и 'wpmu_signup_blog_notification_subject', чтобы изменить содержимое и тему письма, отправляемого новым зарегистрированным пользователям.

## Параметры

- `$domain` `string` — обязательный. Домен нового блога.
- `$path` `string` — обязательный. Путь нового блога.
- `$title` `string` — обязательный. Заголовок сайта.
- `$user_login` `string` — обязательный. Логин пользователя.
- `$user_email` `string` — обязательный. Адрес электронной почты пользователя.
- `$key` `string` — обязательный. Ключ активации, созданный в wpmu_signup_blog() .
- `$meta` `array` — необязательный, по умолчанию `array()`. Метаданные регистрации. По умолчанию содержат запрошенную настройку приватности и lang_id.

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

`bool`

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

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

```php
function wpmu_signup_blog_notification(
	$domain,
	$path,
	$title,
	$user_login,
	$user_email,
	#[\SensitiveParameter]
	$key,
	$meta = array()
) {
	/**
	 * Filters whether to bypass the new site email notification.
	 *
	 * @since MU (3.0.0)
	 *
	 * @param string|false $domain     Site domain, or false to prevent the email from sending.
	 * @param string       $path       Site path.
	 * @param string       $title      Site title.
	 * @param string       $user_login User login name.
	 * @param string       $user_email User email address.
	 * @param string       $key        Activation key created in wpmu_signup_blog().
	 * @param array        $meta       Signup meta data. By default, contains the requested privacy setting and lang_id.
	 */
	if ( ! apply_filters( 'wpmu_signup_blog_notification', $domain, $path, $title, $user_login, $user_email, $key, $meta ) ) {
		return false;
	}

	// Send email with activation link.
	if ( ! is_subdomain_install() || get_current_network_id() !== 1 ) {
		$activate_url = network_site_url( "wp-activate.php?key=$key" );
	} else {
		$activate_url = "http://{$domain}{$path}wp-activate.php?key=$key"; // @todo Use *_url() API.
	}

	$activate_url = esc_url( $activate_url );

	$admin_email = get_site_option( 'admin_email' );

	if ( '' === $admin_email ) {
		$admin_email = 'support@' . wp_parse_url( network_home_url(), PHP_URL_HOST );
	}

	$from_name       = ( '' !== get_site_option( 'site_name' ) ) ? esc_html( get_site_option( 'site_name' ) ) : 'WordPress';
	$message_headers = "From: \"{$from_name}\" <{$admin_email}>\n" . 'Content-Type: text/plain; charset="' . get_option( 'blog_charset' ) . "\"\n";

	$user            = get_user_by( 'login', $user_login );
	$switched_locale = $user && switch_to_user_locale( $user->ID );

	$message = sprintf(
		/**
		 * Filters the message content of the new blog notification email.
		 *
		 * Content should be formatted for transmission via wp_mail().
		 *
		 * @since MU (3.0.0)
		 *
		 * @param string $content    Content of the notification email.
		 * @param string $domain     Site domain.
		 * @param string $path       Site path.
		 * @param string $title      Site title.
		 * @param string $user_login User login name.
		 * @param string $user_email User email address.
		 * @param string $key        Activation key created in wpmu_signup_blog().
		 * @param array  $meta       Signup meta data. By default, contains the requested privacy setting and lang_id.
		 */
		apply_filters(
			'wpmu_signup_blog_notification_email',
			/* translators: New site notification email. 1: Activation URL, 2: New site URL. */
			__( "To activate your site, please click the following link:\n\n%1\$s\n\nAfter you activate, you will receive *another email* with your login.\n\nAfter you activate, you can visit your site here:\n\n%2\$s" ),
			$domain,
			$path,
			$title,
			$user_login,
			$user_email,
			$key,
			$meta
		),
		$activate_url,
		esc_url( "http://{$domain}{$path}" ),
		$key
	);

	$subject = sprintf(
		/**
		 * Filters the subject of the new blog notification email.
		 *
		 * @since MU (3.0.0)
		 *
		 * @param string $subject    Subject of the notification email.
		 * @param string $domain     Site domain.
		 * @param string $path       Site path.
		 * @param string $title      Site title.
		 * @param string $user_login User login name.
		 * @param string $user_email User email address.
		 * @param string $key        Activation key created in wpmu_signup_blog().
		 * @param array  $meta       Signup meta data. By default, contains the requested privacy setting and lang_id.
		 */
		apply_filters(
			'wpmu_signup_blog_notification_subject',
			/* translators: New site notification email subject. 1: Network title, 2: New site URL. */
			_x( '[%1$s] Activate %2$s', 'New site notification email subject' ),
			$domain,
			$path,
			$title,
			$user_login,
			$user_email,
			$key,
			$meta
		),
		$from_name,
		esc_url( 'http://' . $domain . $path )
	);

	wp_mail( $user_email, wp_specialchars_decode( $subject ), $message, $message_headers );

	if ( $switched_locale ) {
		restore_previous_locale();
	}

	return true;
}
```

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

- MU (3.0.0) — Introduced.

## Связанные

Использует: [`switch_to_user_locale`](https://chugunov.pro/api-wordpress/functions/switch_to_user_locale/), [`restore_previous_locale`](https://chugunov.pro/api-wordpress/functions/restore_previous_locale/), [`get_current_network_id`](https://chugunov.pro/api-wordpress/functions/get_current_network_id/), [`wp_parse_url`](https://chugunov.pro/api-wordpress/functions/wp_parse_url/), [`wp_specialchars_decode`](https://chugunov.pro/api-wordpress/functions/wp_specialchars_decode/), [`get_user_by`](https://chugunov.pro/api-wordpress/functions/get_user_by/), [`wp_mail`](https://chugunov.pro/api-wordpress/functions/wp_mail/), [`network_site_url`](https://chugunov.pro/api-wordpress/functions/network_site_url/), [`network_home_url`](https://chugunov.pro/api-wordpress/functions/network_home_url/), [`is_subdomain_install`](https://chugunov.pro/api-wordpress/functions/is_subdomain_install/), [`__`](https://chugunov.pro/api-wordpress/functions/__/), [`_x`](https://chugunov.pro/api-wordpress/functions/_x/), [`esc_url`](https://chugunov.pro/api-wordpress/functions/esc_url/), [`esc_html`](https://chugunov.pro/api-wordpress/functions/esc_html/), [`apply_filters`](https://chugunov.pro/api-wordpress/functions/apply_filters/), [`get_site_option`](https://chugunov.pro/api-wordpress/functions/get_site_option/), [`get_option`](https://chugunov.pro/api-wordpress/functions/get_option/).

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