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
do_action( 'enqueue_block_assets' );
Changelog
Version | Description |
---|---|
5.0.0 | Introduced. |
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: