[wp-trac] [WordPress Trac] #43258: Output buffer template rendering and add filter for post-processing (e.g. caching, optimization)
WordPress Trac
noreply at wordpress.org
Thu Jan 29 21:25:46 UTC 2026
#43258: Output buffer template rendering and add filter for post-processing (e.g.
caching, optimization)
-------------------------------------------------+-------------------------
Reporter: nextendweb | Owner:
| westonruter
Type: enhancement | Status: closed
Priority: normal | Milestone: 6.9
Component: General | Version:
Severity: normal | Resolution: fixed
Keywords: has-patch has-unit-tests dev- | Focuses: docs,
feedback has-dev-note | performance
-------------------------------------------------+-------------------------
Comment (by jorbin):
In [changeset:"61556" 61556]:
{{{
#!CommitTicketReference repository="" revision="61556"
Script Loader: Preserve original CSS cascade for classic themes when
hoisting late-printed styles.
This refactors `wp_hoist_late_printed_styles()` to strictly preserve the
classic theme CSS cascade when moving styles from `wp_footer` to the
`HEAD`. Previously, hoisted styles were appended in an order closer to the
CSS cascade for block themes, potentially causing specificity issues for
CSS selectors written for the previous cascade. This is intended to
eliminate the need for sites which upgraded to 6.9 to apply a hotfix
involving `add_filter( 'should_load_separate_core_block_assets',
'__return_false' )` to disable the optimization.
Key changes:
* Identifies styles enqueued during `enqueue_block_assets`.
* Separates core block styles from third-party block styles.
* Inserts core block styles immediately after `wp-block-library`.
* Inserts third-party block styles after `classic-theme-styles`.
* Inserts `global-styles` after all `enqueue_block_assets` styles.
This ensures the following order is maintained:
1. Core block library.
2. Core block styles.
3. Classic theme styles.
4. Third-party block styles.
5. Global styles.
Developed in https://github.com/WordPress/wordpress-develop/pull/10601
Follow-up to [61174], [61122], [61076], [61008].
Reviewed by jorbin.
Merges [61554] to the 6.9 branch.
Props westonruter, wildworks, jorbin, peterwilsoncc, sabernhardt,
audrasjb, pmbs, threadi, madhavishah01, raftaar1191, noruzzaman, ozgursar.
See #64099, #64150, #43258.
Fixes #64354.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/43258#comment:93>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list