Summery Summery
Retrieve an option value for the current network based on name of option.
Syntax Syntax
Parameters Parameters
- $option
-
(Required) Name of option to retrieve. Expected to not be SQL-escaped.
- $default
-
(Optional) value to return if option doesn't exist.
Default value: false
- $deprecated
-
(Optional) Whether to use cache. Multisite only. Always set to true.
Default value: true
Return Return
(mixed) Value set for the option.
Source Source
File: wp-includes/option.php
if ( isset( $_COOKIE[ 'wp-settings-' . $user_id ] ) ) { $cookie = preg_replace( '/[^A-Za-z0-9=&_-]/', '', $_COOKIE[ 'wp-settings-' . $user_id ] );
Advertisement
Changelog Changelog
Version | Description |
---|---|
4.4.0 | Modified into wrapper for get_network_option() |
2.8.0 | Introduced. |