Filters a widget’s settings before saving.
Description
Returning false will effectively short-circuit the widget’s ability to update settings.
Parameters
$instancearray- The current widget instance’s settings.
$new_instancearray- Array of new widget settings.
$old_instancearray- Array of old widget settings.
$widgetWP_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
columndata.