bp_blogs_confirm_blog_signup( string $domain, string $path, string $blog_title, string $user_name, string $user_email = '', string|array $meta = '', int|null $blog_id = null )

Display a message after successful blog registration.

Description

Parameters

$domain

(string) (Required) The new blog's domain.

$path

(string) (Required) The new blog's path.

$blog_title

(string) (Required) The new blog's title.

$user_name

(string) (Required) The user name of the user who created the blog. Unused.

$user_email

(string) (Optional) The email of the user who created the blog. Unused.

Default value: ''

$meta

(string|array) (Optional) Meta values associated with the new blog. Unused.

Default value: ''

$blog_id

(int|null) (Optional) ID of the newly created blog.

Default value: null

Source

File: bp-blogs/bp-blogs-template.php

function bp_blogs_confirm_blog_signup( $domain, $path, $blog_title, $user_name, $user_email = '', $meta = '', $blog_id = null ) {
	switch_to_blog( $blog_id );
	$blog_url  = set_url_scheme( home_url() );
	$login_url = set_url_scheme( wp_login_url() );
	restore_current_blog();

	?>
	<p><?php _e( 'Congratulations! You have successfully registered a new site.', 'buddyboss' ) ?></p>
	<p>
		<?php printf(
			'%s %s',
			sprintf(
				__( '%s is your new site.', 'buddyboss' ),
				sprintf( '<a href="%s">%s</a>', esc_url( $blog_url ), esc_url( $blog_url ) )
			),
			sprintf(
				/* translators: 1: Login URL, 2: User name */
				__( '<a href="%1$s">Log in</a> as "%2$s" using your existing password.', 'buddyboss' ),
				esc_url( $login_url ),
				esc_html( $user_name )
			)
		); ?>
	</p>

<?php

	/**
	 * Fires after the default successful blog registration message markup.
	 *
	 * @since BuddyPress 1.0.0
	 */
	do_action('signup_finished');
}

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.