wp_new_blog_notification( string $blog_title, string $blog_url, int $user_id, string $password )

Notifies the site admin that the installation of WordPress is complete.


Description

Sends an email to the new administrator that the installation is complete and provides them with a record of their login credentials.


Parameters

$blog_title

(Required) Site title.

$blog_url

(Required) Site URL.

$user_id

(Required) Administrator's user ID.

$password

(Required) Administrator's password. Note that a placeholder message is usually passed instead of the actual password.


Source

File: wp-admin/includes/upgrade.php

function wp_new_blog_notification($blog_title, $blog_url, $user_id, $password) {
	$user = new WP_User( $user_id );
	$email = $user->user_email;
	$name = $user->user_login;
	$login_url = wp_login_url();
	/* translators: New site notification email. 1: New site URL, 2: User login, 3: User password or password reset link, 4: Login URL */
	$message = sprintf( __( "Your new ClassicPress site has been successfully set up at:

%1\$s

You can log in to the administrator account with the following information:

Username: %2\$s
Password: %3\$s
Log in here: %4\$s

We hope you enjoy your new site. Thanks!

--The ClassicPress Team
https://www.classicpress.net/
"), $blog_url, $name, $password, $login_url );

	@wp_mail($email, __('New ClassicPress Site'), $message);
}


Changelog

Changelog
Version Description
2.1.0 Introduced.