A WordPress-centric search engine for devs and theme authors



install_blog_defaults ›

Since3.0.0
DeprecatedMU
install_blog_defaults ( $blog_id, $user_id )
Parameters: (2)
  • (int) $blog_id Ignored in this function.
    Required: Yes
  • (int) $user_id
    Required: Yes
Defined at:
Codex:
Change Log:
  • MU

Set blog defaults.

This function creates a row in the wp_blogs table.



Source

function install_blog_defaults( $blog_id, $user_id ) {
	global $wpdb;

	require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );

	$suppress = $wpdb->suppress_errors();

	wp_install_defaults( $user_id );

	$wpdb->suppress_errors( $suppress );
}