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

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

Description Description

See also See also

Top ↑

Parameters Parameters


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


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

Default value: false


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

Default value: true

Top ↑

Return Return

(mixed) Value set for the option.

Top ↑

Source Source

File: wp-includes/option.php

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

Top ↑

Changelog Changelog

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

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.