From a14d6d04e6b4f2db57d833512fe766bfb1f38126 Mon Sep 17 00:00:00 2001 From: oandregal Date: Fri, 28 Apr 2023 08:51:17 +0000 Subject: [PATCH] Enqueue registered assets once. This PR removes the `wp_enqueue_registered_block_scripts_and_styles` callback from the `enqueue_block_editor_assets` action. There are two actions to enqueue block assets: `enqueue_block_editor_assets` and `enqueue_block_assets`. The former enqueues the assets to the editor and the later enqueues them to the front-end and the editor. Given `wp_enqueue_registered_block_scripts_and_styles` is already bound to the `enqueue_block_assets` (front-end and editor), it is unnecessary to bind it to `enqueue_block_editor_assets` (editor) as well. This was originally introduced at [44157] and hasn't been modified since. Props ellatrix, costdev. Fixes #58208. Built from https://develop.svn.wordpress.org/trunk@55695 git-svn-id: http://core.svn.wordpress.org/trunk@55207 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/default-filters.php | 1 - wp-includes/version.php | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/wp-includes/default-filters.php b/wp-includes/default-filters.php index 92c4c643f9..6d0f0fee4a 100644 --- a/wp-includes/default-filters.php +++ b/wp-includes/default-filters.php @@ -569,7 +569,6 @@ 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 ); -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 982e7fc295..6d63819a19 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.3-alpha-55694'; +$wp_version = '6.3-alpha-55695'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.