confirm_another_blog_signup
Confirm a new site signup.
Description
confirm_another_blog_signup( (string) $domain, (string) $path, (string) $blog_title, (string) $user_name, (string) $user_email = '', (array) $meta = array(), (int) $blog_id = 0 );
Parameters (7)
- 0. $domain (string)
- The domain URL.
- 1. $path (string)
- The site root path.
- 2. $blog_title (string)
- The blog title.
- 3. $user_name (string)
- The user name.
- 4. $user_email — Optional. (string) =>
''
- The user's email address.
- 5. $meta — Optional. (array) =>
array()
- The meta.
- 6. $blog_id — Optional. (int)
- The blog id.
Usage
if ( !function_exists( 'confirm_another_blog_signup' ) ) { require_once '/wp-signup.php'; } // The domain URL. $domain = ''; // The site root path. $path = ''; // The blog title. $blog_title = ''; // The user name. $user_name = ''; // The user's email address. $user_email = ''; // The meta. $meta = array(); // The blog id. $blog_id = -1; // NOTICE! Understand what this does before running. $result = confirm_another_blog_signup($domain, $path, $blog_title, $user_name, $user_email, $meta, $blog_id);
Defined (1)
The function is defined in the following location(s).
- /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();
- } 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: home URL, 2: site address, 3: login URL, 4: username */
- __( '<a href="%1$s">%2$s</a> is your new site. <a href="%3$s">Log in</a> as “%4$s” using your existing password.' ),
- 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
- */
- }