Core Function
View Source on Trac ↗ _wp_remove_unregistered_widgets()
_wp_remove_unregistered_widgets( mixed $sidebars_widgets, mixed $allowed_widget_ids = array() ) Compares a list of sidebars with their widgets against an allowed list.
Parameters 1 required
| Name / Type | Description |
|---|---|
| $sidebars_widgets array | List of sidebars and their widget instance IDs. Required |
| $allowed_widget_ids array | Optional. List of widget IDs to compare against. Default: Registered widgets. |
Return Value
(array)
Sidebars with allowed widgets.
Function Information
Since Version
4.9.0
Source File
wp-includes/widgets.php
Advertisement