This function has been deprecated. Use register_setting() instead.
add_option_update_handler( string $option_group, string $option_name, callable $sanitize_callback = '' )
Register a setting and its sanitization callback
Description
See also
Parameters
- $option_group
-
(Required) A settings group name. Should correspond to a whitelisted option key name. Default whitelisted option key names include "general," "discussion," and "reading," among others.
- $option_name
-
(Required) The name of an option to sanitize and save.
- $sanitize_callback
-
(Optional) A callback function that sanitizes the option's value.
Default value: ''
Source
File: wp-admin/includes/deprecated.php
function add_option_update_handler( $option_group, $option_name, $sanitize_callback = '' ) {
_deprecated_function( __FUNCTION__, 'WP-3.0.0', 'register_setting()' );
register_setting( $option_group, $option_name, $sanitize_callback );
}
Changelog
Version | Description |
---|---|
WP-3.0.0 | Use register_setting() |
WP-2.7.0 | Introduced. This function has been deprecated. Use register_setting() instead. |