[wp-trac] [WordPress Trac] #54790: Stylesheets enqueued via `wp_enqueue_block_style` should only be enqueued when the block gets rendered
WordPress Trac
noreply at wordpress.org
Tue Jan 11 18:01:08 UTC 2022
#54790: Stylesheets enqueued via `wp_enqueue_block_style` should only be enqueued
when the block gets rendered
-------------------------------------------------+-------------------------
Reporter: aristath | Owner:
| hellofromTonya
Type: defect (bug) | Status: closed
Priority: normal | Milestone: 5.9
Component: Editor | Version: trunk
Severity: normal | Resolution: fixed
Keywords: has-patch dev-reviewed commit | Focuses:
fixed-major |
-------------------------------------------------+-------------------------
Changes (by hellofromTonya):
* status: reopened => closed
* resolution: => fixed
Comment:
Consistent with the wrong ticket number :facepalm:
In [changeset:"52559" 52559]:
Editor: Fix enqueueing additional styles in wp_enqueue_block_style() to
print only when blocks render.
In a block theme, additional block styles registered using the
wp_enqueue_block_style function should only get printed when the block
exists on a page. However, they currently always get rendered.
This commit is a backport from Gutenberg that fixes the issue by printing
the styles when a block renders.
Follow-up to [52069].
Props poena, aristath, Mamaduka.
Merges [52556] to the 5.9 branch.
Fixes #54787.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/54790#comment:12>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list