add_site_option( string $option, mixed $value )
Add a new option for the current network.
Description
Existing options will not be updated. Note that prior to WP-3.3 this wasn’t the case.
See also
Parameters
- $option
-
(Required) Name of option to add. Expected to not be SQL-escaped.
- $value
-
(Required) Option value, can be anything. Expected to not be SQL-escaped.
Return
(bool) False if the option was not added. True if the option was added.
Source
File: wp-includes/option.php
function add_site_option( $option, $value ) {
return add_network_option( null, $option, $value );
}
Changelog
Version | Description |
---|---|
WP-4.4.0 | Modified into wrapper for add_network_option() |
WP-2.8.0 | Introduced. |