mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-04 12:44:31 +00:00
Editor: Enqueue assets for format library for the block editor
Ensures that `wp-format-library` assets are always loaded for the block editor. Otherwise, they have to be loaded individually for every screen that needs it. It's similar to how `wp-block-directory` assets are handled. Props ellatrix. See #52920. git-svn-id: https://develop.svn.wordpress.org/trunk@50620 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -2323,6 +2323,16 @@ function enqueue_editor_block_styles_assets() {
|
||||
wp_enqueue_script( 'wp-block-styles' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Enqueues the assets required for the format library within the block editor.
|
||||
*
|
||||
* @since 5.8.0
|
||||
*/
|
||||
function wp_enqueue_editor_format_library_assets() {
|
||||
wp_enqueue_script( 'wp-format-library' );
|
||||
wp_enqueue_style( 'wp-format-library' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Enqueues the assets required for the block directory within the block editor.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user