Uses
Uses | Description |
---|---|
wp-includes/option.php: register_setting() | Registers a setting and its data. |
wp-includes/functions.php: _deprecated_function() | Mark a function as deprecated and inform when it has been used. |
This function has been deprecated. Use register_setting() instead.
Register a setting and its sanitization callback
(string) (Required) A settings group name. Should correspond to an allowed option key name. Default allowed option key names include 'general', 'discussion', 'media', 'reading', 'writing', 'misc', 'options', and 'privacy'.
(string) (Required) The name of an option to sanitize and save.
(callable) (Optional) A callback function that sanitizes the option's value.
Default value: ''
File: wp-admin/includes/deprecated.php
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 ); }
Version | Description |
---|---|
3.0.0 | Use register_setting() |
2.7.0 | Introduced. |
© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/add_option_update_handler