ClassicPress logo
Skip to content
Filter by type:

Browse:

  • Home
  • Functions
  • confirm_another_blog_signup()

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

Shows a message confirming that the new site has been created.


Parameters

$domain

(Required) The domain URL.

$path

(Required) The site root path.

$blog_title

(Required) The site title.

$user_name

(Required) The username.

$user_email

(Optional) The user's email address.

Default value: ''

$meta

(Optional) Any additional meta from the 'add_signup_meta' filter in validate_blog_signup().

Default value: array()

$blog_id

(Required) The site ID.


Source

File: wp-signup.php

function confirm_another_blog_signup( $domain, $path, $blog_title, $user_name, $user_email = '', $meta = array(), $blog_id = 0 ) {

	if ( $blog_id ) {
		switch_to_blog( $blog_id );
		$home_url  = home_url( '/' );
		$login_url = wp_login_url();
		restore_current_blog();
	} else {
		$home_url  = 'http://' . $domain . $path;
		$login_url = 'http://' . $domain . $path . 'wp-login.php';
	}

	$site = sprintf( '<a href="%1$s">%2$s</a>',
		esc_url( $home_url ),
		$blog_title
	);

	?>
	<h2><?php
		/* translators: %s: site name */
		printf( __( 'The site %s is yours.' ), $site );
	?></h2>
	<p>
		<?php printf(
			/* translators: 1: link to new site, 2: login URL, 3: username */
			__( '%1$s is your new site. <a href="%2$s">Log in</a> as &#8220;%3$s&#8221; using your existing password.' ),
			sprintf(
				'<a href="%s">%s</a>',
				esc_url( $home_url ),
				untrailingslashit( $domain . $path )
			),
			esc_url( $login_url ),
			$user_name
		); ?>
	</p>
	<?php
	/**
	 * Fires when the site or user sign-up process is complete.
	 *
	 * @since WP-3.0.0
	 */
	do_action( 'signup_finished' );
}

Expand Source Code View on GitHub


Related

Uses

Uses
Uses Description
wp-signup.php: signup_finished

Fires when the site or user sign-up process is complete.

wp-includes/general-template.php: wp_login_url()

Retrieves the login URL.

wp-includes/link-template.php: home_url()

Retrieves the URL for the current site where the front end is accessible.

wp-includes/ms-blogs.php: switch_to_blog()

Switches the current blog.

wp-includes/ms-blogs.php: restore_current_blog()

Restores the current blog, after calling switch_to_blog().

wp-includes/plugin.php: do_action()

Calls the callback functions that have been added to an action hook.

Show 1 more use Hide more uses

Used By

Used By
Used By Description
wp-signup.php: validate_another_blog_signup()

Validates a new site sign-up for an existing user.


Changelog

Changelog
Version Description
4.4.0 Added the $blog_id parameter.
MU (3.0.0) Introduced. MU (3.0.0)
ClassicPress Documentation • Made with ClassicPress
Privacy Policy