bp_core_activation_signup_blog_notification( string $domain, string $path, string $title, string $user, string $user_email, string $key )

Notify new users of a successful registration (with blog).

Description

This function filter’s WP’s ‘wpmu_signup_blog_notification’, and replaces WP’s default welcome email with a BuddyPress-specific message.

See also

Parameters

$domain

(string) (Required) The new blog domain.

$path

(string) (Required) The new blog path.

$title

(string) (Required) The site title.

$user

(string) (Required) The user's login name.

$user_email

(string) (Required) The user's email address.

$key

(string) (Required) The activation key created in wpmu_signup_blog().

Return

(bool) Returns false to stop original WPMU function from continuing.

Source

File: bp-core/bp-core-filters.php

function bp_core_activation_signup_blog_notification( $domain, $path, $title, $user, $user_email, $key ) {
	$args = array(
		'tokens' => array(
			'activate-site.url' => esc_url( bp_get_activation_page() . '?key=' . urlencode( $key ) ),
			'domain'            => $domain,
			'key_blog'          => $key,
			'path'              => $path,
			'user-site.url'     => esc_url( set_url_scheme( "http://{$domain}{$path}" ) ),
			'title'             => $title,
			'user.email'        => $user_email,
		),
	);
	bp_send_email( 'core-user-registration-with-blog', array( array( $user_email => $user ) ), $args );

	// Return false to stop the original WPMU function from continuing.
	return false;
}

Changelog

Changelog
Version Description
BuddyPress 1.0.0 Introduced.

Questions?

We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.