mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2025-10-16 12:05:38 +00:00
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. git-svn-id: https://develop.svn.wordpress.org/trunk@55695 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
991fa6bff2
commit
5c247f75f3
@ -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' );
|
||||
|
||||
Loading…
Reference in New Issue
Block a user