[wp-trac] [WordPress Trac] #64099: Load block styles on demand in classic themes via template enhancement output buffer
WordPress Trac
noreply at wordpress.org
Tue Oct 21 05:59:57 UTC 2025
#64099: Load block styles on demand in classic themes via template enhancement
output buffer
----------------------------------------+--------------------------
Reporter: westonruter | Owner: westonruter
Type: enhancement | Status: closed
Priority: normal | Milestone: 6.9
Component: Script Loader | Version:
Severity: normal | Resolution: fixed
Keywords: has-patch needs-unit-tests | Focuses: performance
----------------------------------------+--------------------------
Changes (by westonruter):
* status: accepted => closed
* resolution: => fixed
Comment:
In [changeset:"61008" 61008]:
{{{
#!CommitTicketReference repository="" revision="61008"
Script Loader: Load block styles on demand in classic themes via the
template enhancement output buffer.
* This applies in classic themes when a site has not opted out of the
template enhancement buffer by filtering
`wp_should_output_buffer_template_for_enhancement` off.
* Both `should_load_separate_core_block_assets` and
`should_load_block_assets_on_demand` are filtered on, as otherwise they
are only enabled by default in block themes.
* Any style enqueued after `wp_head` and printed via `print_late_styles()`
will get hoisted up to be inserted right after the `wp-block-library`
inline style in the `HEAD`.
* The result is a >10% benchmarked improvement in LCP for core classic
themes due to a ~100KB reduction in the amount of CSS unconditionally
being served with every page load.
Developed in https://github.com/WordPress/wordpress-develop/pull/10288
Follow-up to [60936].
Props sjapaget, westonruter, peterwilsoncc, dmsnell, mindctrl.
See #43258.
Fixes #64099.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/64099#comment:21>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list