wp_installed_email хук-фильтрWP 5.6.0

Filters the contents of the email sent to the site administrator when WordPress is installed.

Использование

add_filter( 'wp_installed_email', 'wp_kama_installed_email_filter', 10, 5 );

/**
 * Function for `wp_installed_email` filter-hook.
 * 
 * @param array   $installed_email Used to build wp_mail().
 * @param WP_User $user            The site administrator user object.
 * @param string  $blog_title      The site title.
 * @param string  $blog_url        The site URL.
 * @param string  $password        The site administrator's password. Note that a placeholder message is usually passed instead of the user's actual password.
 *
 * @return array
 */
function wp_kama_installed_email_filter( $installed_email, $user, $blog_title, $blog_url, $password ){

	// filter...
	return $installed_email;
}
$installed_email(массив)

Used to build wp_mail().

  • to(строка)
    The email address of the recipient.

  • subject(строка)
    The subject of the email.

  • message(строка)
    The content of the email.

  • headers(строка)
    Headers.
$user(WP_User)
The site administrator user object.
$blog_title(строка)
The site title.
$blog_url(строка)
The site URL.
$password(строка)
The site administrator's password. Note that a placeholder message is usually passed instead of the user's actual password.

Список изменений

С версии 5.6.0 Введена.

Где вызывается хук

wp_new_blog_notification()
wp_installed_email
wp-admin/includes/upgrade.php 607
$installed_email = apply_filters( 'wp_installed_email', $installed_email, $user, $blog_title, $blog_url, $password );

Где используется хук в WordPress

Использование не найдено.