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/unregister setting

Contents

Description

Allows clean de-registration of registered settings. Should be used mostly in deactivation hooks.

Usage

<?php unregister_setting$option_group$option_name$sanitize_callback ); ?>

Parameters

$option_group
(string) (required) Group the option belongs to (used in register_setting).
Default: None
$option_name
(string) (required) Name of the option
Default: None
$sanitize_callback
(string) (optional) Function that fills the section with the desired content. The function should echo its output.
Default: (Empty string)

Return Values

(void) 
This function does not return a value.

Change Log

Since: 2.7.0

Source File

unregister_setting() is located in wp-admin/includes/plugin.php.

Related

Settings API: register_setting(), unregister_setting(), add_settings_field(), add_settings_section(), add_settings_error(), get_settings_errors(), settings_errors()

See also index of Function Reference and index of Template Tags.