• About WordPress
    • About WordPress
    • WordPress.org
    • Documentation
    • Support
    • Feedback
  • Log In
  • Register

WordPress.org

  • Showcase
  • Learn
  • Themes
  • Plugins
  • Mobile
  • Support
    • Documentation
    • Forums
  • Get Involved
    • Five for the Future
  • About
  • Blog
  • Hosting
  • Get WordPress

Code Reference

Skip to content
Filter by type:
Search
Browse: Home / Reference / 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 )

Confirm a new site signup.

Contents

  • Parameters
  • Source
  • Related
    • Uses
    • Used By
  • Changelog
  • User Contributed Notes

Parameters #Parameters

$domain

(string) (Required) The domain URL.

$path

(string) (Required) The site root path.

$blog_title

(string) (Required) The site title.

$user_name

(string) (Required) The username.

$user_email

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

Default value: ''

$meta

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

Default value: array()

$blog_id

(int) (Required) The site ID.


Top ↑

Source #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 title. */
		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 3.0.0
	 */
	do_action( 'signup_finished' );
}

Expand full source code Collapse full source code View on Trac


Top ↑

Related #Related

Uses #Uses

Uses
Uses Description
wp-signup.php: signup_finished

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

wp-includes/l10n.php: __()

Retrieve the translation of $text.

wp-includes/formatting.php: esc_url()

Checks and cleans a URL.

wp-includes/formatting.php: untrailingslashit()

Removes trailing forward slashes and backslashes if they exist.

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/plugin.php: do_action()

Execute functions hooked on a specific action hook.

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

Switch the current blog.

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

Restore the current blog, after calling switch_to_blog().

Show 4 more uses Hide more uses

Top ↑

Used By #Used By

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

Validate a new site signup for an existing user.


Top ↑

Changelog #Changelog

Changelog
Version Description
MU (3.0.0) MU (3.0.0)
4.4.0 Introduced.

Top ↑

User Contributed Notes #User Contributed Notes

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

  • About
  • Blog
  • Hosting
  • Donate
  • Support
  • Developers
  • Get Involved
  • Learn
  • Showcase
  • Plugins
  • Themes
  • WordCamp
  • WordPress.TV
  • BuddyPress
  • bbPress
  • WordPress.com
  • Matt
  • Privacy
  • Public Code
  • @WordPress
  • WordPress

Code is Poetry.

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.