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

  1. if ( !function_exists( 'wpmu_signup_blog' ) ) { 
  2. require_once ABSPATH . WPINC . '/ms-functions.php'; 
  3.  
  4. // The requested domain. 
  5. $domain = ''; 
  6.  
  7. // The requested path. 
  8. $path = ''; 
  9.  
  10. // The requested site title. 
  11. $title = ''; 
  12.  
  13. // The user's requested login name. 
  14. $user = ''; 
  15.  
  16. // The user's email address. 
  17. $user_email = ''; 
  18.  
  19. // By default, contains the requested privacy setting and lang_id. 
  20. $meta = array(); 
  21.  
  22. // NOTICE! Understand what this does before running. 
  23. $result = wpmu_signup_blog($domain, $path, $title, $user, $user_email, $meta); 
  24.  

Defined (1)

The function is defined in the following location(s).

/wp-includes/ms-functions.php  
  1. function wpmu_signup_blog( $domain, $path, $title, $user, $user_email, $meta = array() ) { 
  2. global $wpdb; 
  3.  
  4. $key = substr( md5( time() . wp_rand() . $domain ), 0, 16 ); 
  5. $meta = serialize($meta); 
  6.  
  7. $wpdb->insert( $wpdb->signups, array( 
  8. 'domain' => $domain,  
  9. 'path' => $path,  
  10. 'title' => $title,  
  11. 'user_login' => $user,  
  12. 'user_email' => $user_email,  
  13. 'registered' => current_time('mysql', true),  
  14. 'activation_key' => $key,  
  15. 'meta' => $meta 
  16. ) ); 
  17.  
  18. /** 
  19. * Fires after site signup information has been written to the database. 
  20. * @since 4.4.0 
  21. * @param string $domain The requested domain. 
  22. * @param string $path The requested path. 
  23. * @param string $title The requested site title. 
  24. * @param string $user The user's requested login name. 
  25. * @param string $user_email The user's email address. 
  26. * @param string $key The user's activation key 
  27. * @param array $meta By default, contains the requested privacy setting and lang_id. 
  28. */ 
  29. do_action( 'after_signup_site', $domain, $path, $title, $user, $user_email, $key, $meta );