wpmu_signup_blog
Record site signup information for future activation.
Description
wpmu_signup_blog( (string) $domain, (string) $path, (string) $title, (string) $user, (string) $user_email, (array) $meta = array() );
Parameters (6)
- 0. $domain (string)
- The requested domain.
- 1. $path (string)
- The requested path.
- 2. $title (string)
- The requested site title.
- 3. $user (string)
- The user's requested login name.
- 4. $user_email (string)
- The user's email address.
- 5. $meta — Optional. (array) =>
array()
- By default, contains the requested privacy setting and lang_id.
Usage
if ( !function_exists( 'wpmu_signup_blog' ) ) { require_once ABSPATH . WPINC . '/ms-functions.php'; } // The requested domain. $domain = ''; // The requested path. $path = ''; // The requested site title. $title = ''; // The user's requested login name. $user = ''; // The user's email address. $user_email = ''; // By default, contains the requested privacy setting and lang_id. $meta = array(); // NOTICE! Understand what this does before running. $result = wpmu_signup_blog($domain, $path, $title, $user, $user_email, $meta);
Defined (1)
The function is defined in the following location(s).
- /wp-includes/ms-functions.php
- function wpmu_signup_blog( $domain, $path, $title, $user, $user_email, $meta = array() ) {
- global $wpdb;
- $key = substr( md5( time() . wp_rand() . $domain ), 0, 16 );
- $meta = serialize($meta);
- $wpdb->insert( $wpdb->signups, array(
- 'domain' => $domain,
- 'path' => $path,
- 'title' => $title,
- 'user_login' => $user,
- 'user_email' => $user_email,
- 'registered' => current_time('mysql', true),
- 'activation_key' => $key,
- 'meta' => $meta
- ) );
- /**
- * Fires after site signup information has been written to the database.
- *
- * @since 4.4.0
- *
- * @param string $domain The requested domain.
- * @param string $path The requested path.
- * @param string $title The requested site title.
- * @param string $user The user's requested login name.
- * @param string $user_email The user's email address.
- * @param string $key The user's activation key
- * @param array $meta By default, contains the requested privacy setting and lang_id.
- */
- do_action( 'after_signup_site', $domain, $path, $title, $user, $user_email, $key, $meta );
- }