update_blog_option()
Updates an option for a particular blog.
No Hooks.
Return
true|false
. True if the value was updated, false otherwise.
Usage
update_blog_option( $id, $option, $value, $deprecated );
- $id(int) (required)
- The blog ID.
- $option(string) (required)
- The option key.
- $value(mixed) (required)
- The option value.
- $deprecated(mixed)
- Not used.
Default: null
Changelog
Since 3.0.0 | Introduced. |
update_blog_option() update blog option code WP 6.6.1
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 ); restore_current_blog(); return $return; }