Make WordPress Core


Ignore:
Timestamp:
07/21/2020 03:36:17 PM (4 years ago)
Author:
desrosj
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/script-loader.php

    r48396 r48537  
    14641464        ),
    14651465        'block-library'        => array(),
     1466        'block-directory'      => array(),
    14661467        'components'           => array(),
    14671468        'edit-post'            => array(
     
    15281529        'wp-block-editor',
    15291530        'wp-block-library',
     1531        'wp-block-directory',
    15301532        'wp-components',
    15311533        'wp-edit-post',
     
    22702272    wp_enqueue_script( 'wp-block-styles' );
    22712273}
     2274
     2275/**
     2276 * Enqueues the assets required for the block directory within the block editor.
     2277 *
     2278 * @since 5.5.0
     2279 */
     2280function wp_enqueue_editor_block_directory_assets() {
     2281    wp_enqueue_script( 'wp-block-directory' );
     2282    wp_enqueue_style( 'wp-block-directory' );
     2283}
Note: See TracChangeset for help on using the changeset viewer.