insert_blog [ WordPress Function ]
insert_blog ( $domain, $path, $site_id )
| Parameters: |
|
| Returns: |
|
| Defined at: |
|
Soorgelijke functies: 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.
Source
<?php
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;
refresh_blog_details($wpdb->insert_id);
return $wpdb->insert_id;
}
?>
Examples [ wp-snippets.com ]
Top Google zoekresultaten
- 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 - 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 - insert_blog | A HitchHackers guide through WordPress
Feb 12, 2011 ... function insert_blog($domain, $path, $site_id) {}. Store basic site info in the blogs table. This function creates a row in the wp_blogs table and ...
hitchhackerguide.com - Shit I Say.
I'm 22 years old, living in Boston, attending music school as a vocalist. Born in Wisconsin, lived in Beijing for 9 years of my childhood, have an unhealthy ...
minorfour.tumblr.com