[wp-trac] [WordPress Trac] #64360: enqueue_block_assets action ignores script modules
WordPress Trac
noreply at wordpress.org
Thu Dec 4 18:26:27 UTC 2025
#64360: enqueue_block_assets action ignores script modules
-------------------------+-----------------------------
Reporter: jonsurrell | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Editor | Version:
Severity: normal | Keywords:
Focuses: javascript |
-------------------------+-----------------------------
[https://developer.wordpress.org/reference/hooks/enqueue_block_assets/ The
enqueue_block_assets action] is used to add scripts and styles in the
block editor's iframe.
It should be possible to add script modules to the block editor's iframe
as well.
See:
- [https://github.com/WordPress/wordpress-
develop/blob/0b50baa5d164bedd17d3ae9e2eafc6286d6255b6/src/wp-includes
/block-editor.php#L285-L390 _wp_get_iframed_editor_assets] and
[https://developer.wordpress.org/reference/functions/_wp_get_iframed_editor_assets/
its documentation].
- [https://github.com/WordPress/wordpress-
develop/blob/0b50baa5d164bedd17d3ae9e2eafc6286d6255b6/src/wp-includes
/class-wp-script-modules.php#L16 The WP_Script_Modules class].
-
[https://github.com/WordPress/gutenberg/blob/2314c0ceaf727c08a6091fd6ae82bb1759fb3c02/packages
/block-editor/src/components/iframe/index.js#L99-L279 The block editor
Iframe component in Gutenberg.]
This will likely require a new method or exposing more of the script
modules internal data so that a specific WP_Script_Modules instance can be
used for the iframed assets. See #60597.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/64360>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list