update_site_option( string $option, mixed $value ): bool
Updates the value of an option that was already added for the current network.
Contents
Description
See also
Parameters
-
$option
string Required -
Name of the option. Expected to not be SQL-escaped.
-
$value
mixed Required -
Option value. Expected to not be SQL-escaped.
Return
bool True if the value was updated, false otherwise.
Source
File: wp-includes/option.php
.
View all references
function update_site_option( $option, $value ) {
return update_network_option( null, $option, $value );
}
Changelog
Version | Description |
---|---|
4.4.0 | Modified into wrapper for update_network_option() |
2.8.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.
As of 4.0, despite this function’s name, the value is stored in the network’s sitemeta table, not the site’s options table.
Top ↑
Feedback
Only if multisite is enabled (
is_multisite()
). Otherwise it callsupdate_option()
. — By Bence Szalai —