[wp-trac] [WordPress Trac] #63676: Blocks without rendered content (including blocks via block visibility) still enqueue scripts and styles
WordPress Trac
noreply at wordpress.org
Tue Oct 14 22:26:57 UTC 2025
#63676: Blocks without rendered content (including blocks via block visibility)
still enqueue scripts and styles
-------------------------------------+-------------------------------------
Reporter: westonruter | Owner: westonruter
Type: defect (bug) | Status: reopened
Priority: normal | Milestone: 6.9
Component: Editor | Version: 5.9
Severity: normal | Resolution:
Keywords: has-patch needs-testing | Focuses: javascript, css,
dev-feedback has-unit-tests | performance
-------------------------------------+-------------------------------------
Comment (by westonruter):
It does seem that the issue is that `wp_head` and `wp_footer` are
themselves inside of blocks for this theme, which I admit I was not
expecting (and which seems would be quite unusual). Because the queues are
emptied before each block is rendered (and restored afterward), it makes
sense that certain assets would not be printed because the queue is empty!
So if `wp_head` and `wp_footer` are inside of blocks, they wouldn't
actually be expected to print anything.
It is also true that `wp_script_is( 'admin-bar', 'enqueued' )` would
always return `false` with [60930].
--
Ticket URL: <https://core.trac.wordpress.org/ticket/63676#comment:30>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list