mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-04 12:44:31 +00:00
Adds the widgets block editor to widgets.php and customize.php
Moves the widgets block editor from Gutenberg into WordPress Core. - Adds @wordpress/edit-widgets, @wordpress/customize-widgets and @wordpress/widgets. - Modifies wp-admin/widgets.php to branch between the old editor and new editor depending on wp_use_widgets_block_editor(). - Modifies WP_Customize_Widgets to branch between the old editor control and new editor control depending on wp_use_widgets_block_editor(). Fixes #51506. Props isabel_brison, TimothyBlynJacobs, andraganescu, kevin940726, talldanwp. git-svn-id: https://develop.svn.wordpress.org/trunk@50996 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -225,6 +225,40 @@ function get_default_block_editor_settings() {
|
||||
$editor_settings['gradients'] = $gradient_presets;
|
||||
}
|
||||
|
||||
/**
|
||||
* Filters the list of widget-type IDs that should **not** be offered by the
|
||||
* Legacy Widget block.
|
||||
*
|
||||
* Returning an empty array will make all widgets available.
|
||||
*
|
||||
* @since 5.8.0
|
||||
*
|
||||
* @param array $widgets An array of excluded widget-type IDs.
|
||||
*/
|
||||
$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',
|
||||
'meta',
|
||||
'search',
|
||||
'text',
|
||||
'categories',
|
||||
'recent-posts',
|
||||
'recent-comments',
|
||||
'rss',
|
||||
'tag_cloud',
|
||||
'nav_menu',
|
||||
'custom_html',
|
||||
'block',
|
||||
)
|
||||
);
|
||||
|
||||
return $editor_settings;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user