Strips out widget IDs for widgets which are no longer registered.
One example where this might happen is when a plugin orphans a widget in a sidebar upon deactivation.
(array) (Required) List of widget IDs.
(array) Parsed list of widget IDs.
File: wp-includes/class-wp-customize-widgets.php
public function sanitize_sidebar_widgets_js_instance( $widget_ids ) { global $wp_registered_widgets; $widget_ids = array_values( array_intersect( $widget_ids, array_keys( $wp_registered_widgets ) ) ); return $widget_ids; }
Version | Description |
---|---|
3.9.0 | Introduced. |
© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_customize_widgets/sanitize_sidebar_widgets_js_instance