Filters a widget’s settings before saving.
Description
Returning false will effectively short-circuit the widget’s ability to update settings.
Parameters
$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.
Source
$instance = apply_filters( 'widget_update_callback', $instance, $new_instance, $old_instance, $this );
Changelog
Version | Description |
---|---|
2.8.0 | Introduced. |
You may filter any field that already registered. For testing, Firstly we create a custom widget field end of the each widgets control form.
Now, we filter widget’s settings before saving. It will save our custom field
column
data.