WordPress.org

Ready to get started?Download WordPress

Codex

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

Difference between revisions of "Function Reference/delete option"

(Linked to Option Reference)
(Using Parameter template)
Line 18: Line 18:
   
 
== Parameters ==
 
== Parameters ==
+
{{Parameter|$name|string|Name of the option to be deleted. A list of valid default options can be found at the [[Option Reference]].}}the [[Option Reference]].
; name : (''string'') Name of the option. Underscores separate words, lowercase only. A list of valid default options can be found at the [[Option Reference]].
 
   
 
[[Category:Functions]]
 
[[Category:Functions]]
 
 
{{Copyedit}}
 
{{Copyedit}}

Revision as of 02:17, 13 January 2008

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: Nonethe Option Reference.
This article is marked as in need of editing. You can help Codex by editing it.