get_site_option

Advertisement

Summery Summery

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

Syntax Syntax

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

Parameters Parameters

$option

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

$default

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

Default value: false

$deprecated

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

Default value: true

Return Return

(mixed) Value set for the option.

Source Source

File: wp-includes/option.php

	if ( isset( $_COOKIE[ 'wp-settings-' . $user_id ] ) ) {
		$cookie = preg_replace( '/[^A-Za-z0-9=&_-]/', '', $_COOKIE[ 'wp-settings-' . $user_id ] );

Advertisement

Changelog Changelog

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

See also See also

Advertisement

Leave a Reply