delete_site_option() WordPress Function

The delete_site_option() function deletes a specified option from the current site's options database table. The function takes two parameters: the option name (string) and the site ID (integer). If the site ID is not specified, the current site's ID is used.

delete_site_option( string $option ) #

Removes a option by name for the current network.


Description

Top ↑

See also


Top ↑

Parameters

$option

(string)(Required)Name of the option to delete. Expected to not be SQL-escaped.


Top ↑

Return

(bool) True if the option was deleted, false otherwise.


Top ↑

Source

File: wp-includes/option.php

function delete_site_option( $option ) {
	return delete_network_option( null, $option );
}


Top ↑

Changelog

Changelog
VersionDescription
4.4.0Modified into wrapper for delete_network_option()
2.8.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.

Show More