WordPress at a glance
function is not described

add_option_update_handler() WP 2.7.0

Deprecated in 3.0.0. It is no longer supported and can be removed in future releases. Use register_setting() instead.

Register a setting and its sanitization callback

  • See: register_setting()

No Hooks.


Nothing (null).


add_option_update_handler( $option_group, $option_name, $sanitize_callback );
$option_group(string) (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(string) (required)
The name of an option to sanitize and save.
A callback function that sanitizes the option's value.
Default: ''

Code of add option update handler: wp-admin/includes/deprecated.php WP 5.2.1

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 );