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.


Parameters 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 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 class="success"><?php esc_html_e( 'Congratulations! You have successfully registered a new site.', 'buddypress' ) ?></p>
	<p>
		<?php printf(
			'%s %s',
			sprintf(
				/* translators: %s: the link of the new site */
				__( '%s is your new site.', 'buddypress' ),
				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.', 'buddypress' ),
				esc_url( $login_url ),
				esc_html( $user_name )
			)
		); ?>
	</p>

<?php

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


Top ↑

Changelog Changelog

Changelog
Version Description
2.6.0 Introduced $blog_id parameter.
1.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.