Script Loader: Move `wp_load_classic_theme_block_styles_on_demand()` from `init` to `wp_default_styles`.
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. git-svn-id: https://develop.svn.wordpress.org/trunk@61981 602fd350-edb4-49c9-b593-d223f7449a82
W
Weston Ruter committed
f29f594acf22a8d6e7fa83b0e41ff23ec27a8f5e
Parent: d577970