Skip to content

Conversation

@westonruter
Copy link
Member

See rationale. This reverts part of r61076, the part which added the wp-block-styles theme support check.

Trac ticket: https://core.trac.wordpress.org/ticket/64099


This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.

@westonruter westonruter changed the title Remove wp-block-styles theme support precondition for loading block styles on demand Remove wp-block-styles theme support precondition for loading block styles on demand Nov 4, 2025
@github-actions
Copy link

github-actions bot commented Nov 4, 2025

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

Core Committers: Use this line as a base for the props when committing in SVN:

Props westonruter.

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@github-actions
Copy link

github-actions bot commented Nov 4, 2025

Test using WordPress Playground

The changes in this pull request can previewed and tested using a WordPress Playground instance.

WordPress Playground is an experimental project that creates a full WordPress instance entirely within the browser.

Some things to be aware of

  • The Plugin and Theme Directories cannot be accessed within Playground.
  • All changes will be lost when closing a tab with a Playground instance.
  • All changes will be lost when refreshing the page.
  • A fresh instance is created each time the link below is clicked.
  • Every time this pull request is updated, a new ZIP file containing all changes is created. If changes are not reflected in the Playground instance,
    it's possible that the most recent build failed, or has not completed. Check the list of workflow runs to be sure.

For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation.

Test this pull request with WordPress Playground.

pento pushed a commit that referenced this pull request Nov 4, 2025
…n `wp-block-styles` support is absent.

This reverts part of [61076] which made `wp-block-styles` theme support a precondition for opting in to `should_load_separate_core_block_assets` and `should_load_block_assets_on_demand`. This meant that the Twenty Twenty theme (and other themes without this support declared) would not benefit from on-demand block style loading. Nevertheless, even though such themes were not getting block styles loaded on demand, the  `wp_load_classic_theme_block_styles_on_demand()` function was proceeding to opt in to the output buffer for hoisting late-printed styles, even though it was unlikely there would then be any. This meant the template enhancement output buffer was being opened for no reason.

Enabling on-demand block style loading is measured to improve FCP and LCP in Twenty Twenty, for example a ~13% improvement over a Fast 4G connection when loading the Sample Page.

Developed in #10457

Follow-up to [61008], [61076], [60936].

Props westonruter.
See #64099, #64150, #64166, #43258.


git-svn-id: https://develop.svn.wordpress.org/trunk@61122 602fd350-edb4-49c9-b593-d223f7449a82
@westonruter
Copy link
Member Author

Committed in r61122

@westonruter westonruter closed this Nov 4, 2025
markjaquith pushed a commit to markjaquith/WordPress that referenced this pull request Nov 4, 2025
…n `wp-block-styles` support is absent.

This reverts part of [61076] which made `wp-block-styles` theme support a precondition for opting in to `should_load_separate_core_block_assets` and `should_load_block_assets_on_demand`. This meant that the Twenty Twenty theme (and other themes without this support declared) would not benefit from on-demand block style loading. Nevertheless, even though such themes were not getting block styles loaded on demand, the  `wp_load_classic_theme_block_styles_on_demand()` function was proceeding to opt in to the output buffer for hoisting late-printed styles, even though it was unlikely there would then be any. This meant the template enhancement output buffer was being opened for no reason.

Enabling on-demand block style loading is measured to improve FCP and LCP in Twenty Twenty, for example a ~13% improvement over a Fast 4G connection when loading the Sample Page.

Developed in WordPress/wordpress-develop#10457

Follow-up to [61008], [61076], [60936].

Props westonruter.
See #64099, #64150, #64166, #43258.

Built from https://develop.svn.wordpress.org/trunk@61122


git-svn-id: http://core.svn.wordpress.org/trunk@60458 1a063a9b-81f0-0310-95a4-ce76da25c4cd
github-actions bot pushed a commit to platformsh/wordpress-performance that referenced this pull request Nov 4, 2025
…n `wp-block-styles` support is absent.

This reverts part of [61076] which made `wp-block-styles` theme support a precondition for opting in to `should_load_separate_core_block_assets` and `should_load_block_assets_on_demand`. This meant that the Twenty Twenty theme (and other themes without this support declared) would not benefit from on-demand block style loading. Nevertheless, even though such themes were not getting block styles loaded on demand, the  `wp_load_classic_theme_block_styles_on_demand()` function was proceeding to opt in to the output buffer for hoisting late-printed styles, even though it was unlikely there would then be any. This meant the template enhancement output buffer was being opened for no reason.

Enabling on-demand block style loading is measured to improve FCP and LCP in Twenty Twenty, for example a ~13% improvement over a Fast 4G connection when loading the Sample Page.

Developed in WordPress/wordpress-develop#10457

Follow-up to [61008], [61076], [60936].

Props westonruter.
See #64099, #64150, #64166, #43258.

Built from https://develop.svn.wordpress.org/trunk@61122


git-svn-id: https://core.svn.wordpress.org/trunk@60458 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant