insert_blog [ WordPress-Funktionen ]
insert_blog ( $domain, $path, $site_id )
| Parameter: |
|
| Gibt zurück: |
|
| Definiert in: |
|
| Codex |
Ähnliche Funktionen: install_blog, add_user_to_blog, add_new_user_to_blog, wp_insert_link, wp_insert_post
Store basic site info in the blogs table.
This function creates a row in the wp_blogs table and returns the new blog's ID. It is the first step in creating a new blog.
Quellcode
function insert_blog($domain, $path, $site_id) {
global $wpdb;
$path = trailingslashit($path);
$site_id = (int) $site_id;
$result = $wpdb->insert( $wpdb->blogs, array('site_id' => $site_id, 'domain' => $domain, 'path' => $path, 'registered' => current_time('mysql')) );
if ( ! $result )
return false;
$blog_id = $wpdb->insert_id;
refresh_blog_details( $blog_id );
return $blog_id;
}Beispiele [ wp-snippets.com ]
Top Google Suchergebnisse
- Function Reference/insert blog « WordPress Codex
Description. Store basic site info in the blogs table. This function creates a row in the wp_blogs table and returns the new blog's ID. It is the first step in creating a ...
codex.wordpress.org - WPMU Functions/insert blog « WordPress Codex
Description. Inserts blog information into the wp_blogs table and performs a refresh of blog details after. Parameters. $domain: (string) (required) The domain of ...
codex.wordpress.org - WordPress › Support » Insert blog template into homepage
[closed] Insert blog template into homepage (1 post). coroleu. Member Posted 2 hours ago #. Hi, i need to include "blog_page_2_column.php" into homepage.
wordpress.org - wpmu_create_blog (WordPress Function) - WPSeek.com
May 11, 2013 ... $blog_id = insert_blog($domain, $path, $site_id) ) return new WP_Error(' insert_blog', __('Could not create site.')); switch_to_blog($blog_id) ...
wpseek.com
