Function: update_site_option

update_site_option( string $option, mixed $value )

Update the value of an option that was already added for the current network.

Shortcut: uso

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
$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. True if value was updated.

WordPress Developer Newsletter

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