delete_blog_option

Advertisement

Summery Summery

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

Syntax Syntax

delete_blog_option( int $id, string $option )

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.

Return Return

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

Source Source

File: wp-includes/ms-blogs.php

/**
 * Removes option by name for a given blog ID. Prevents removal of protected WordPress options.
 *
 * @since MU (3.0.0)
 *
 * @param int    $id     A blog ID. Can be null to refer to the current blog.
 * @param string $option Name of option to remove. Expected to not be SQL-escaped.
 * @return bool True if the option was deleted, false otherwise.
 */
function delete_blog_option( $id, $option ) {
	$id = (int) $id;

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

	if ( get_current_blog_id() == $id ) {

Advertisement

Changelog Changelog

Changelog
Version Description
MU (3.0.0) Introduced.

Advertisement

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.