Get it All
Together

NOTE: this function is deprecated in WordPress 3.0

Summary: Checks the file upload directory for a given blog to see how much space is available.

Detail: This function is called in the process of uploading files, though you could call it within a plugin for the sake of just checking the available space for a user.

NOTE: This function is deprecated in WordPress 3.0

Summary: Sets the text domain (language and country) of the given domain.

Detail: This function checks the locale set in Site Options and in the absence of this variable, defaults to en_US.  It then sets the path to the location of the language files to be used later.

NOTE: This function is deprecated in WordPress 3.0

Summary: Returns an unordered array of blogs on the domain.

Detail: This function first checks for the existence of a site_option called “blog_list,” and verifies that the option is no more than sixty seconds old.  If the option does not exist or is older than sixty seconds, the database is queried for the blog list and the option is set.

The $num variable sets the number of returned blogs.  The results can be offset using the $start parameter to tell the function how far down the list of blog to start.

If $display is set to ‘true’, as it is by default, the function will return an array of <li>’s for output to the page.

NOTE: This function is deprecated in WordPress 3.0

Summary: Returns an array of blogs ordered by the number of posts in each blog.

Detail: This function tests for the existence of a site option called “most_active,” the cached version of which is valid for one minute at most. If the most_active option is newer than sixty seconds, the site_option version is used. If the most_active value is older than sixty seconds, the database is queried for this information and a new value set to the site_option.

The $num parameter sets the number of active blogs returned.  If the parameter $display is set to true, is it is by default, a series of <li>’s, each containing a link to and the name of each of the returned blogs is print()’ed for output to the web page.

Summary:  These functions get or set site option variables according to user specification.

Detail:  The full function names with their variables and brief descriptions are as follows:

get_site_option( $key, $default = false, $use_cache = true )

This function checks for the existence of the option named $key.  By default, the function will first in the wp_cache and failing that, in the database.  Should the key exist in the database but not the cache, it will be added.  If it appears in neither location, the $default value “false” will be added to the cache.  By setting $use_default to false, you can override the option to use the cache in the query, but the cache is still updated with the returned value.

add_site_option( $key, $value )

This function first checks for the existence of the option $key in the site meta table, and if that option exists, calls update_site_option().  Otherwise, it first serializes objects and arrays passed as $value, then creates and sets the option. Additionally, this function will destroy any wp-cache’d reference to the option.

update_site_option( $key, $value )

This function is essentially the same as add_site_option in most respects, except that it assumes the option exists and only calls add_site_option if updating the option returns false.  Technically, this would be the more efficient function to call unless it is certain that the option does not exist.