Languages: English • 日本語 (Add your language)
Allows clean de-registration of registered settings.
Should be used mostly in deactivation hooks (edit: Really? The Settings API is about adding settings to admin screens at runtime. It's the Options API which handles their persistence in the database. This sentence led to me try to use this function to remove my saved options, which didn't work. If someone can explain how deactivation hooks should use this function, please edit this to say. User:DrIanMcDonald)
<?php unregister_setting( $option_group, $option_name, $sanitize_callback ); ?>
Since: 2.7.0
unregister_setting() is located in wp-includes/option.php
.
Settings API: register_setting(), unregister_setting(), add_settings_field(), add_settings_section(), add_settings_error(), get_settings_errors(), settings_errors()