wp_is_site_initialized example

global $wpdb$wp_roles;

    if ( empty( $site_id ) ) {
        return new WP_Error( 'site_empty_id', __( 'Site ID must not be empty.' ) );
    }

    $site = get_site( $site_id );
    if ( ! $site ) {
        return new WP_Error( 'site_invalid_id', __( 'Site with the ID does not exist.' ) );
    }

    if ( wp_is_site_initialized( $site ) ) {
        return new WP_Error( 'site_already_initialized', __( 'The site appears to be already initialized.' ) );
    }

    $network = get_network( $site->network_id );
    if ( ! $network ) {
        $network = get_network();
    }

    $args = wp_parse_args(
        $args,
        array(
            
Home | Imprint | This part of the site doesn't use cookies.