Definition:
function unregister_setting( $option_group, $option_name, $sanitize_callback = '' ) {}
Unregister a setting
Parameters
- unknown_type $option_group
- unknown_type $option_name
- unknown_type $sanitize_callback
Source code
function unregister_setting( $option_group, $option_name, $sanitize_callback = '' ) {
global $new_whitelist_options;
if ( 'misc' == $option_group ) {
_deprecated_argument( __FUNCTION__, '3.0', __( 'The miscellaneous options group has been removed. Use another settings group.' ) );
$option_group = 'general';
}
$pos = array_search( $option_name, (array) $new_whitelist_options );
if ( $pos !== false )
unset( $new_whitelist_options[ $option_group ][ $pos ] );
if ( $sanitize_callback != '' )
remove_filter( "sanitize_option_{$option_name}", $sanitize_callback );
3135

February 12, 2011 


No comments yet... Be the first to leave a reply!