WordPress at a glance

get_site_option() WP 1.0

Retrieve an option value for the current network based on name of option.

Works based on: get_network_option()

No Hooks.


Mixed. Value set for the option.


get_site_option( $option, $default, $deprecated );
$option(string) (required)
Name of the option to retrieve. Expected to not be SQL-escaped.
Value to return if the option doesn't exist.
Default: false
Whether to use cache. Multisite only. Always set to true.


  • See: get_network_option()


Since 2.8.0 Introduced.
Since 4.4.0 The $use_cache parameter was deprecated.
Since 4.4.0 Modified into wrapper for get_network_option()

Code of get_site_option() WP 5.6.2

function get_site_option( $option, $default = false, $deprecated = true ) {
	return get_network_option( null, $option, $default );

From tag: Options API (settings)

No comments
    Log In