wp_initialize_site


wp_initialize_site ( $site_id, $args = array() )

Parameters:
  • (int|WP_Site) site_id Site ID or object.
  • (array) args { Optional. Arguments to modify the initialization behavior. @type int $user_id Required. User ID for the site administrator. @type string $title Site title. Default is 'Site %d' where %d is the site ID. @type array $options Custom option $key => $value pairs to use. Default empty array. @type array $meta Custom site metadata $key => $value pairs to use. Default empty array. }
Returns:
  • (true|WP_Error) True on success, or error object on failure.
Defined at:

Description

Runs the initialization routine for a given site.This process includes creating the site's database tables and populating them with defaults.

Related Functions

wp_uninitialize_site, wp_normalize_site_data, wp_insert_site, wp_initial_constants, wp_localize_script

Top Google Results

User discussions

wpseek mobile