Register a setting and its sanitization callback
Description
See also
Parameters
$option_groupstringrequired- A settings group name. Should correspond to an allowed option key name.
Default allowed option key names include'general','discussion','media','reading','writing', and'options'. $option_namestringrequired- The name of an option to sanitize and save.
$sanitize_callbackcallableoptional- A callback function that sanitizes the option’s value.
Default:
''
Source
function add_option_update_handler( $option_group, $option_name, $sanitize_callback = '' ) {
_deprecated_function( __FUNCTION__, '3.0.0', 'register_setting()' );
register_setting( $option_group, $option_name, $sanitize_callback );
}
Changelog
| Version | Description |
|---|---|
| 3.0.0 | Use register_setting() |
| 2.7.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.