WPDev.one
Core Function
View Source on Trac ↗

add_option_update_handler()

add_option_update_handler( mixed $option_group, mixed $option_name, mixed $sanitize_callback = '' )

Register a setting and its sanitization callback

Parameters 2 required

Name / Type Description
string

$option_group 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'.

Required
$option_name
string

The name of an option to sanitize and save.

Required
$sanitize_callback
callable

Optional. A callback function that sanitizes the option's value.

Return Value

(void)
No return value description available.

Function Information

Since Version
2.7.0
Source File
wp-admin/includes/deprecated.php
Advertisement