-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Remove wp-block-styles theme support precondition for loading block styles on demand
#10457
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove wp-block-styles theme support precondition for loading block styles on demand
#10457
Conversation
wp-block-styles theme support precondition for loading block styles on demand
|
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 Core Committers: Use this line as a base for the props when committing in SVN: To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Test using WordPress PlaygroundThe 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
For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation. |
…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
|
Committed in r61122 |
…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
…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
See rationale. This reverts part of r61076, the part which added the
wp-block-stylestheme 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.