Function: get_site_option

get_site_option( string $option, mixed $default, boolean $deprecated )

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


Name Type(s) Default Value Description
$option string

Name of option to retrieve. Expected to not be SQL-escaped.

$default mixed false

Optional value to return if option doesn't exist. Default false.

$deprecated boolean true

Whether to use cache. Multisite only. Always set to true.



Value set for the option.

WordPress Developer Newsletter

Stay on top of the latest WordPress API changes, developer tool updates, security alerts and more.