diff --git a/wp-includes/default-filters.php b/wp-includes/default-filters.php index 82b579913a..063199269c 100644 --- a/wp-includes/default-filters.php +++ b/wp-includes/default-filters.php @@ -571,6 +571,20 @@ add_action( 'admin_enqueue_scripts', 'wp_localize_jquery_ui_datepicker', 1000 ); add_action( 'admin_enqueue_scripts', 'wp_common_block_scripts_and_styles' ); add_action( 'enqueue_block_assets', 'wp_enqueue_registered_block_scripts_and_styles' ); add_action( 'enqueue_block_assets', 'enqueue_block_styles_assets', 30 ); +/* + * `wp_enqueue_registered_block_scripts_and_styles` is bound to both + * `enqueue_block_editor_assets` and `enqueue_block_assets` hooks + * since the introduction of the block editor in WordPress 5.0. + * + * The way this works is that the block assets are loaded before any other assets. + * For example, this is the order of styles for the editor: + * + * - front styles registered for blocks, via `styles` handle (block.json) + * - editor styles registered for blocks, via `editorStyles` handle (block.json) + * - editor styles enqueued via `enqueue_block_editor_assets` hook + * - front styles enqueued via `enqueue_block_assets` hook + */ +add_action( 'enqueue_block_editor_assets', 'wp_enqueue_registered_block_scripts_and_styles' ); add_action( 'enqueue_block_editor_assets', 'enqueue_editor_block_styles_assets' ); add_action( 'enqueue_block_editor_assets', 'wp_enqueue_editor_block_directory_assets' ); add_action( 'enqueue_block_editor_assets', 'wp_enqueue_editor_format_library_assets' ); diff --git a/wp-includes/version.php b/wp-includes/version.php index 14e0ad7b47..85543dcc37 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.3-alpha-55851'; +$wp_version = '6.3-alpha-55852'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.