update_blog_option
Update an option for a particular blog.
Description
Parameters (4)
- 0. $id (int)
- The blog id.
- 1. $option (string)
- The option key.
- 2. $value (mixed)
- The option value.
- 3. $deprecated — Optional. (null) =>
null
- The deprecated.
Usage
if ( !function_exists( 'update_blog_option' ) ) { require_once ABSPATH . WPINC . '/ms-blogs.php'; } // The blog id. $id = -1; // The option key. $option = ''; // The option value. $value = null; // The deprecated. $deprecated = null; // NOTICE! Understand what this does before running. $result = update_blog_option($id, $option, $value, $deprecated);
Defined (1)
The function is defined in the following location(s).
- /wp-includes/ms-blogs.php
- function update_blog_option( $id, $option, $value, $deprecated = null ) {
- $id = (int) $id;
- if ( null !== $deprecated )
- _deprecated_argument( __FUNCTION__, '3.1.0' );
- if ( get_current_blog_id() == $id )
- return update_option( $option, $value );
- switch_to_blog( $id );
- $return = update_option( $option, $value );
- return $return;
- }