WordPress.org

Codex

Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

WPMU Functions/add blog option

Description

A safe way of adding a named option/value pair to the options database table of a specific blog. Operationally it switches to the specified blog, runs the WordPress add_option() function, switches back to the previous current blog and updates the cache.

Parameters

$blog_id
(integer) (required) ID of the blog to add the option to.
Default: None
$key
(string) (required) The name of the option to be added.)
Default: None
$value
(string) (required) Value for this option name. Limited to 2^32 bytes of data .)
Default: None

Return Values

(null)

Usage

<?php add_blog_option($blog_id$key$value); ?>

Example

<?php

add_blog_option
5'myhack_extraction_length''255' );

?>