This ensures the filters to opt in to loading separate block styles on demand are added at the moment `WP_Styles` is constructed. This accounts for styles being registered at the `init` action before `register_core_block_style_handles()` runs at priority 9. Without this, the `wp-block-library` stylesheet may get registered with the full combined block styles as `style.css` instead of just `common.css`, due to `wp_should_load_block_assets_on_demand()` still returning false. The `wp_default_styles` action still runs during `init`. Developed in https://github.com/WordPress/wordpress-develop/pull/11232 Follow-up to r61008. Props westonruter, adamsilverstein. See #64099. Fixes #64846. Built from https://develop.svn.wordpress.org/trunk@61981 git-svn-id: http://core.svn.wordpress.org/trunk@61263 1a063a9b-81f0-0310-95a4-ce76da25c4cd
159 KiB
159 KiB