WordPress at Your Fingertips
filter is not described

widget_update_callback filter-hook . WP 2.8.0

Filters a widget's settings before saving.

Returning false will effectively short-circuit the widget's ability to update settings.

Usage

add_filter( 'widget_update_callback', 'filter_function_name_2758', 10, 4 );
function filter_function_name_2758( $instance, $new_instance, $old_instance, $widget ){
	// filter...

	return $instance;
}
$instance(array)
The current widget instance's settings.
$new_instance(array)
Array of new widget settings.
$old_instance(array)
Array of old widget settings.
$widget(WP_Widget)
The current widget instance.

Changelog

Since 2.8.0 Introduced.

Where the hook is called

WP_Widget::update_callback()
widget_update_callback
WP_REST_Widget_Types_Controller::encode_form_data()
widget_update_callback
wp-includes/class-wp-widget.php 475
$instance = apply_filters( 'widget_update_callback', $instance, $new_instance, $old_instance, $this );
wp-includes/rest-api/endpoints/class-wp-rest-widget-types-controller.php 469-475
$instance = apply_filters(
	'widget_update_callback',
	$instance,
	$new_instance,
	$old_instance,
	$widget_object
);

Where in WP core the hook is used WordPress

Usage not found.