apply_filters( 'widget_update_callback', array $instance, array $new_instance, array $old_instance, WP_Widget $widget )
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
Changelog
Version | Description |
---|---|
2.8.0 | Introduced. |
© 2003–2021 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/hooks/widget_update_callback