wpmu_welcome_user_notification

Definition:
function wpmu_welcome_user_notification($user_id, $password, $meta = '') {}

Notify a user that her account activation has been successful.
Filter ‘wpmu_welcome_user_notification’ to disable or bypass.

Parameters

  • int $user_id
  • string $password
  • array $meta: Optional. Not used in the default function, but is passed along to hooks for customization.

Defined filters

  • wpmu_welcome_user_notification
    apply_filters('wpmu_welcome_user_notification', $user_id, $password, $meta)
  • update_welcome_user_email
    apply_filters( 'update_welcome_user_email', $welcome_email, $user_id, $password, $meta)

Source code

function wpmu_welcome_user_notification($user_id, $password, $meta = '') {

	global $current_site;



	if ( !apply_filters('wpmu_welcome_user_notification', $user_id, $password, $meta) )

		return false;



	$welcome_email = get_site_option( 'welcome_user_email' );



	$user = new WP_User($user_id);



	$welcome_email = apply_filters( 'update_welcome_user_email', $welcome_email, $user_id, $password, $meta);

	$welcome_email = str_replace( 'SITE_NAME', $current_site->site_name, $welcome_email );

	$welcome_email = str_replace( 'USERNAME', $user->user_login, $welcome_email );

	$welcome_email = str_replace( 'PASSWORD', $password, $welcome_email );

	$welcome_email = str_replace( 'LOGINLINK', wp_login_url(), $welcome_email );



	$admin_email = get_site_option( 'admin_email' );



	if ( $admin_email == '' )

		$admin_email = 'support@' . $_SERVER['SERVER_NAME'];



	$from_name = get_site_option( 'site_name' ) == '' ? 'WordPress' : esc_html( get_site_option( 'site_name' ) );

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

3409

wpmu_welcome_notification

Definition:
function wpmu_welcome_notification($blog_id, $user_id, $password, $title, $meta = '') {}

Notify a user that her blog activation has been successful.
Filter ‘wpmu_welcome_notification’ to disable or bypass.

Parameters

  • int $blog_id
  • int $user_id
  • string $password
  • string $title: The new blog’s title
  • array $meta: Optional. Not used in the default function, but is passed along to hooks for customization.

Defined filters

  • wpmu_welcome_notification
    apply_filters('wpmu_welcome_notification', $blog_id, $user_id, $password, $title, $meta)
  • update_welcome_email
    apply_filters( 'update_welcome_email', $welcome_email, $blog_id, $user_id, $password, $title, $meta)

Source code

function wpmu_welcome_notification($blog_id, $user_id, $password, $title, $meta = '') {

	global $current_site;



	if ( !apply_filters('wpmu_welcome_notification', $blog_id, $user_id, $password, $title, $meta) )

		return false;



	$welcome_email = stripslashes( get_site_option( 'welcome_email' ) );

	if ( $welcome_email == false )

		$welcome_email = stripslashes( __( 'Dear User,



Your new SITE_NAME site has been successfully set up at:

BLOG_URL



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

Username: USERNAME

Password: PASSWORD

Log in here: BLOG_URLwp-login.php



We hope you enjoy your new site. Thanks!



--The Team @ SITE_NAME' ) );



	$url = get_blogaddress_by_id($blog_id);

	$user = new WP_User($user_id);



	$welcome_email = str_replace( 'SITE_NAME', $current_site->site_name, $welcome_email );

	$welcome_email = str_replace( 'BLOG_TITLE', $title, $welcome_email );

	$welcome_email = str_replace( 'BLOG_URL', $url, $welcome_email );

	$welcome_email = str_replace( 'USERNAME', $user->user_login, $welcome_email );

	$welcome_email = str_replace( 'PASSWORD', $password, $welcome_email );



	$welcome_email = apply_filters( 'update_welcome_email', $welcome_email, $blog_id, $user_id, $password, $title, $meta);

	$admin_email = get_site_option( 'admin_email' );



	if ( $admin_email == '' )

		$admin_email = 'support@' . $_SERVER['SERVER_NAME'];



	$from_name = get_site_option( 'site_name' ) == '' ? 'WordPress' : esc_html( get_site_option( 'site_name' ) );

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

3407

wpmu_update_blogs_date

Definition:
function wpmu_update_blogs_date() {}

Update the last_updated field for the current blog.

Defined actions

  • wpmu_blog_updated
    do_action( 'wpmu_blog_updated', $wpdb->blogid );

Source code

function wpmu_update_blogs_date() {

	global $wpdb;



	update_blog_details( $wpdb->blogid, array('last_updated' => current_time('mysql', true)) );



	do_action( 'wpmu_blog_updated', $wpdb->blogid );

}

3401