On this page
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
$domainstring Required-
The domain URL.
$pathstring Required-
The site root path.
$blog_titlestring Required-
The site title.
$user_namestring Required-
The username.
$user_emailstring Optional-
The user's email address.
Default:
'' $metaarray Optional-
Any additional meta from the 'add_signup_meta' filter in validate_blog_signup() .
Default:
array() $blog_idint Required-
The site ID.
Source
File: wp-signup.php. View all references
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 “%3$s” 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' );
}
Hooks
- do_action( 'signup_finished' )
-
Fires when the site or user sign-up process is complete.
Related
Uses
| Uses | Description |
|---|---|
| untrailingslashit() wp-includes/formatting.php | Removes trailing forward slashes and backslashes if they exist. |
| wp_login_url() wp-includes/general-template.php | Retrieves the login URL. |
| switch_to_blog() wp-includes/ms-blogs.php | Switch the current blog. |
| restore_current_blog() wp-includes/ms-blogs.php | Restore the current blog, after calling switch_to_blog() . |
| __() wp-includes/l10n.php | Retrieves the translation of $text. |
| esc_url() wp-includes/formatting.php | Checks and cleans a URL. |
| home_url() wp-includes/link-template.php | Retrieves the URL for the current site where the front end is accessible. |
| do_action() wp-includes/plugin.php | Calls the callback functions that have been added to an action hook. |
Used By
| Used By | Description |
|---|---|
| validate_another_blog_signup() wp-signup.php | Validates a new site sign-up for an existing user. |
Changelog
| Version | Description |
|---|---|
| MU (3.0.0) | MU (3.0.0) |
| 4.4.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/confirm_another_blog_signup