update_site_option()
Update the value of an option that was already added for the current network.
Uses: update_network_option()
Used By: grant_super_admin()
No Hooks.
Return
true|false
. True if the value was updated, false otherwise.
Usage
update_site_option( $option, $value );
- $option(string) (required)
- Name of the option. Expected to not be SQL-escaped.
- $value(mixed) (required)
- Option value. Expected to not be SQL-escaped.
Examples
#1 Save the network of sites option and get it
update_site_option( 'my_site_option', 321 ); echo get_site_option( 'my_site_option' ); //> 321
Notes
Changelog
Since 2.8.0 | Introduced. |
Since 4.4.0 | Modified into wrapper for update_network_option() |
update_site_option() update site option code WP 6.7.1
function update_site_option( $option, $value ) { return update_network_option( null, $option, $value ); }