Function: update_network_option

update_network_option( integer $network_id, string $option, mixed $value )

Update the value of a network option that was already added.

Shortcut: uno

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.

Parameters

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. Expected to not be SQL-escaped.

$value mixed

Option value. Expected to not be SQL-escaped.

Returns

boolean

False if value was not updated and true if value was updated.

WordPress Developer Newsletter

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