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.


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 on top of the latest WordPress API changes, developer tool updates, security alerts and more.