delete_blog_option( int $id, string $option )

Removes option by name for a given blog id. Prevents removal of protected WordPress options.


Description Description


Parameters Parameters

$id

(int) (Required) A blog ID. Can be null to refer to the current blog.

$option

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


Top ↑

Return Return

(bool) True, if option is successfully deleted. False on failure.


Top ↑

Source Source

File: wp-includes/ms-blogs.php

function delete_blog_option( $id, $option ) {
	$id = (int) $id;

	if ( empty( $id ) )
		$id = get_current_blog_id();

	if ( get_current_blog_id() == $id )
		return delete_option( $option );

	switch_to_blog( $id );
	$return = delete_option( $option );
	restore_current_blog();

	return $return;
}

Top ↑

Changelog Changelog

Changelog
Version Description
MU Introduced.


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.