WordPress.org

Ready to get started?Download WordPress

Codex

Attention Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

Function Reference/delete option

Description

A safe way of removing a named option/value pair from the options database table.

Usage

<?php delete_option($name); ?>

Example

Usage

<?php delete_option("myhack_extraction_length"); ?>

Parameters

$name
(string) (required) Name of the option to be deleted. A list of valid default options can be found at the Option Reference.
Default: None
This article is marked as in need of editing. You can help Codex by editing it.