mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-04 04:34:31 +00:00
Editor: Ensure the required assets for the block directory are enqueued.
This fixes an issue where the block directory appears unstyled due to the stylesheets not being enqueued. Props ryelle, timothyblynjacobs, earnjam. Fixes #50661. git-svn-id: https://develop.svn.wordpress.org/trunk@48537 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -1463,6 +1463,7 @@ function wp_default_styles( $styles ) {
|
||||
'wp-editor-font',
|
||||
),
|
||||
'block-library' => array(),
|
||||
'block-directory' => array(),
|
||||
'components' => array(),
|
||||
'edit-post' => array(
|
||||
'wp-components',
|
||||
@@ -1527,6 +1528,7 @@ function wp_default_styles( $styles ) {
|
||||
'wp-edit-blocks',
|
||||
'wp-block-editor',
|
||||
'wp-block-library',
|
||||
'wp-block-directory',
|
||||
'wp-components',
|
||||
'wp-edit-post',
|
||||
'wp-editor',
|
||||
@@ -2269,3 +2271,13 @@ function enqueue_editor_block_styles_assets() {
|
||||
wp_add_inline_script( 'wp-block-styles', $inline_script );
|
||||
wp_enqueue_script( 'wp-block-styles' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Enqueues the assets required for the block directory within the block editor.
|
||||
*
|
||||
* @since 5.5.0
|
||||
*/
|
||||
function wp_enqueue_editor_block_directory_assets() {
|
||||
wp_enqueue_script( 'wp-block-directory' );
|
||||
wp_enqueue_style( 'wp-block-directory' );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user