mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-04 04:34:31 +00:00
Editor: Update WordPress packages to use with WordPress 5.8
In the response to the discussion during the Dev Chat, I'm doing a first pass to keep WordPress packages up to date in the WordPress 5.8 release cycle. See https://github.com/WordPress/wordpress-develop/pull/1176 for more details. Props youknowriad, aristath, andraganescu. See #52991. git-svn-id: https://develop.svn.wordpress.org/trunk@50761 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -1504,16 +1504,42 @@ function wp_default_styles( $styles ) {
|
||||
|
||||
$styles->add( 'wp-block-library-theme', "/wp-includes/css/dist/block-library/theme$suffix.css" );
|
||||
|
||||
$styles->add(
|
||||
'wp-reset-editor-styles',
|
||||
"/wp-includes/css/dist/block-library/reset$suffix.css",
|
||||
array( 'common', 'forms' ) // Make sure the reset is loaded after the default WP Admin styles.
|
||||
);
|
||||
|
||||
$styles->add(
|
||||
'wp-editor-classic-layout-styles',
|
||||
"/wp-includes/css/dist/edit-post/classic$suffix.css",
|
||||
array()
|
||||
);
|
||||
|
||||
$wp_edit_blocks_dependencies = array(
|
||||
'wp-components',
|
||||
'wp-editor',
|
||||
// This need to be added before the block library styles,
|
||||
// The block library styles override the "reset" styles.
|
||||
'wp-reset-editor-styles',
|
||||
'wp-block-library',
|
||||
'wp-reusable-blocks',
|
||||
|
||||
// This dependency shouldn't be added for themes with theme.json support
|
||||
// It's here for backward compatibility only.
|
||||
// A check should be added here when theme.json is backported to Core.
|
||||
'wp-editor-classic-layout-styles',
|
||||
);
|
||||
global $editor_styles;
|
||||
if ( ! is_array( $editor_styles ) || count( $editor_styles ) === 0 ) {
|
||||
// Include opinionated block styles if no $editor_styles are declared, so the editor never appears broken.
|
||||
$wp_edit_blocks_dependencies[] = 'wp-block-library-theme';
|
||||
}
|
||||
|
||||
$styles->add(
|
||||
'wp-edit-blocks',
|
||||
"/wp-includes/css/dist/block-library/editor$suffix.css",
|
||||
array(
|
||||
'wp-components',
|
||||
'wp-editor',
|
||||
'wp-block-library',
|
||||
// Always include visual styles so the editor never appears broken.
|
||||
'wp-block-library-theme',
|
||||
)
|
||||
$wp_edit_blocks_dependencies
|
||||
);
|
||||
|
||||
$package_styles = array(
|
||||
@@ -1533,9 +1559,11 @@ function wp_default_styles( $styles ) {
|
||||
'wp-components',
|
||||
'wp-block-editor',
|
||||
'wp-nux',
|
||||
'wp-reusable-blocks',
|
||||
),
|
||||
'format-library' => array(),
|
||||
'list-reusable-blocks' => array( 'wp-components' ),
|
||||
'reusable-blocks' => array( 'wp-components' ),
|
||||
'nux' => array( 'wp-components' ),
|
||||
);
|
||||
|
||||
@@ -1580,6 +1608,8 @@ function wp_default_styles( $styles ) {
|
||||
'wp-pointer',
|
||||
'wp-jquery-ui-dialog',
|
||||
// Package styles.
|
||||
'wp-reset-editor-styles',
|
||||
'wp-editor-classic-layout-styles',
|
||||
'wp-block-library-theme',
|
||||
'wp-edit-blocks',
|
||||
'wp-block-editor',
|
||||
@@ -1590,6 +1620,7 @@ function wp_default_styles( $styles ) {
|
||||
'wp-editor',
|
||||
'wp-format-library',
|
||||
'wp-list-reusable-blocks',
|
||||
'wp-reusable-blocks',
|
||||
'wp-nux',
|
||||
// Deprecated CSS.
|
||||
'deprecated-media',
|
||||
|
||||
Reference in New Issue
Block a user