Summary: Checks a requested new blog’s information against a series of validation rules.
Detail: This function checks that a new blog meets a number of validation rules before proceeding on to create the blog. The rules include making sure the new blog’s name isn’t on the banned list, checking that there is a name, that it is alphanumerical, that it’s long enough, etc. You can pretty much read through this function if you want to check the rules as they are.
You could also use this function to impose your own rules, if you’d prefer hacking the core to creating a plugin.
Tags: Functions, WordPress
Summary: High-level function that creates a new blog with the given parameters
Detail: This function is a high-level function that combines a number of other functions to create a new blog. It uses the install_blog(), install_blog_defaults() and add_user_to_blog() to set all the needed values in the database. This would be the preferred function to use when creating a new blog, rather than all the lower-level functions.
Tags: Functions, WordPress
Summary: Very basic function simply sets up the new blog email that end-users use to activate their blogs.
Tags: Functions, WordPress
Summary: Installs the default values of a WP blog during the creation of a new blog
Details: This function does a lot, and depending on how you want your blogs setup, may be useful to modify. It sets up default values for such things as the blogroll, the first post, the first comment, the default category. Of these options, only the default post can be set in Blog Options, so for finer tuning of the end-user experience, editing this file might be helpful.
Tags: Functions, WordPress
Summary: Creates a new blog with the id $blog_id and the title $blog_title
Detail: This is a very complex function that involves calling the upgrade-functions.php file and using a bunch of it’s functions to complete its task. This is definitely a function which – in the absence of a specific need – is better off left on its own and accessed through the API.
Tags: Functions, WordPress
Summary: Creates an entry in the wp_blogs table (or equivalent) for a new blog with the domain $domain, the path $path and within the site $site_id.
Detail: This is one of the functions called when a new blog is created. It’s not the whole process, and unless you have a specific reason for calling it, is probably best left to itself. It only really performs two functions, the first being the insertion of the new blog into the database, and the second being a refresh on the wp_cache to include the new blog.
Tags: Functions, WordPress
Summary: Retrieves the post $post_id from the blog $blog_id
Detail: This simple function checks the wp_cache for the blog post in question, and in its absence, queries the database directly for the whole thing. Returns an object with all the values contained in the database.
Tags: Functions, WordPress
Summary: Returns the number of blogs that exist on either the current domain or the domain $id.
Detail: This function counts the number of blogs on a give domain. By default, it checks the current domain, but if $id is set, another domain can be checked as well. The number of blogs is cached in the dB for 60 seconds, but queries after that 60 seconds elicit another query of the dB.
Tags: Functions, WordPress
Summary: Returns the value $pref of blog $id from the wp-blogs or equivalent table.
Detail: This function returns a value from one of the fields of the wp-blogs or equivalent table. It first checks the get_blog_details() function to see if the blog even exists, and if so, queries the dB for the value.
Tags: Functions, WordPress
Summary: This function updates the status $pref of blog $id to value $value.
Detail: This function directly sets the status of a blog in the dB. If the $refresh value is set to 1, which it is by default, the status of the blog is refreshed in the wp-cache using the refresh_blog_details() function.
Additionally, if the blog is set to a “spam” or “ham” blog, the function calls the make_spam_blog or the make_ham_blog actions, respectively.
Tags: Functions, WordPress