Adds a new option for the current network.
Description
Existing options will not be updated. Note that prior to 3.3 this wasn’t the case.
See also
Parameters
$option
stringrequired- Name of the option to add. Expected to not be SQL-escaped.
$value
mixedrequired- Option value, can be anything. Expected to not be SQL-escaped.
Source
function add_site_option( $option, $value ) {
return add_network_option( null, $option, $value );
}
Changelog
Version | Description |
---|---|
4.4.0 | Modified into wrapper for add_network_option() |
2.8.0 | Introduced. |
Install the option defaults
Examples
Default usage:
Behavior if the option already exists:
Parameter $value is listed as optional. It is not optional; it is required.