get_site_option

SummerySummery

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

Syntax

get_site_option( string $option, mixed $default = false, bool $deprecated = true )

ParametersParameters

$option

(string) (Required) Name of option to retrieve. Expected to not be SQL-escaped.

$default

(mixed) (Optional) value to return if option doesn't exist.

Default value: false

$deprecated

(bool) (Optional) Whether to use cache. Multisite only. Always set to true.

Default value: true

ReturnReturn

(mixed) Value set for the option.

SourceSource

File: wp-includes/option.php


			

ChangelogChangelog

Changelog
Version Description
4.4.0 Modified into wrapper for get_network_option()
2.8.0 Introduced.

See alsoSee also

Scroll to Top