wppaste
WordPress

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

Since
2.8.0, 4.4.0, 4.4.0
Source
wp-includes/option.php:1932
Retrieve an option value for the current network based on name of option.

Parameters

$optionstring
Name of the option to retrieve. Expected to not be SQL-escaped.
$default_valuemixedoptional
Value to return if the option doesn't exist. Default false.Default: false
$deprecatedbooloptional
Whether to use cache. Multisite only. Always set to true.Default: true

Return

mixed
Value set for the option.

Uses · 1

Used by · 50

Show all 50

Source

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

History

Introduced in 2.8.0. Unchanged from 6.7.7 through 7.1.0.

  1. 6.7.7
  2. 6.8.8
  3. 6.9.7
  4. 7.0.4
  5. 7.1.0

Signature, return type and hooks compared across 5 parsed releases.

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

About this page

Parsed data
Generated from the wordpress-develop 7.0.4 tag, from src/wp-includes/option.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
Corrections
Something wrong on this page? Report it and it gets fixed in the next regeneration.