do_action( 'enqueue_block_assets' )
Fires after enqueuing block assets for both editor and front-end.
Description
Call add_action
on any hook before ‘wp_enqueue_scripts’.
In the function call you supply, simply use wp_enqueue_script
and wp_enqueue_style
to add your functionality to the Gutenberg editor.
Source
File: wp-includes/script-loader.php
.
View all references
do_action( 'enqueue_block_assets' );
Changelog
Version | Description |
---|---|
5.0.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.
From version 6.3 onwards, styles and scripts added using
enqueue_block_assets()
will be enqueued for the editor iframe. If the intention is to limit styles to the editor only, simply use theis_admin()
condition. Example: