Function: get_network_option

get_network_option( integer $network_id, string $option, mixed $default )

Retrieve a network's option value based on the option name.

Shortcut: gno

You can use above key combination to trigger the associated snippet for this function in the WordPress Snippets for Visual Studio Code extension. You can also use this shortcut to search for this function on this website.


Name Type(s) Default Value Description
$network_id integer

ID of the network. Can be null to default to the current network ID.

$option string

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

$default mixed false

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



Value set for the option.

WordPress Developer Newsletter

Stay informed of new chapter releases, important WordPress API updates and more.