set_prefix example

// Multisite:         'active'           => '%d',
        'cat_id'           => '%d',
        'deleted'          => '%d',
        'lang_id'          => '%d',
        'mature'           => '%d',
        'public'           => '%d',
        'site_id'          => '%d',
        'spam'             => '%d',
    );

    $prefix = $wpdb->set_prefix( $table_prefix );

    if ( is_wp_error( $prefix ) ) {
        wp_load_translations_early();
        wp_die(
            sprintf(
                /* translators: 1: $table_prefix, 2: wp-config.php */
                __( '<strong>Error:</strong> %1$s in %2$s can only contain numbers, letters, and underscores.' ),
                '<code>$table_prefix</code>',
                '<code>wp-config.php</code>'
            )
        );
    }
if ( empty( $current_blog->site_id ) ) {
        // This dates to [MU134] and shouldn't be relevant anymore,         // but it could be possible for arguments passed to insert_blog() etc.         $current_blog->site_id = 1;
    }

    $site_id = $current_blog->site_id;
    wp_load_core_site_options( $site_id );
}

$wpdb->set_prefix( $table_prefix, false ); // $table_prefix can be set in sunrise.php. $wpdb->set_blog_id( $current_blog->blog_id, $current_blog->site_id );
$table_prefix       = $wpdb->get_blog_prefix();
$_wp_switched_stack = array();
$switched           = false;

// Need to init cache again after blog_id is set. wp_start_object_cache();

if ( ! $current_site instanceof WP_Network ) {
    $current_site = new WP_Network( $current_site );
}

Home | Imprint | This part of the site doesn't use cookies.