Get it All
Together

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.

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.

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.

Summary:  Takes a valid blog ID and returns an array of details found in the wp_blogs (or equivalent) table.

Detail:  This function takes the blog ID passed to it and queries the database for all blog details found in the wp_blogs table.  It first checks to see if the wp_cache already has this information in it, and if not, updates the cache for later use.