Filters the list of widget-type IDs that should **not** be offered by the Legacy Widget block.
Description
Returning an empty array will make all widgets available.
Parameters
$widgets
string[]- An array of excluded widget-type IDs.
Source
$editor_settings['widgetTypesToHideFromLegacyWidgetBlock'] = apply_filters(
'widget_types_to_hide_from_legacy_widget_block',
array(
'pages',
'calendar',
'archives',
'media_audio',
'media_image',
'media_gallery',
'media_video',
'search',
'text',
'categories',
'recent-posts',
'recent-comments',
'rss',
'tag_cloud',
'custom_html',
'block',
)
);
Changelog
Version | Description |
---|---|
5.8.0 | Introduced. |
In version 5.8, the following widgets are hidden from the Legacy Widget block:
To make all of them visible, the following code can be used: