Commit f29f594
committed
Script Loader: Move
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 #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-d223f7449a82wp_load_classic_theme_block_styles_on_demand() from init to wp_default_styles.1 parent d577970 commit f29f594
3 files changed
Lines changed: 10 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
607 | 607 | | |
608 | 608 | | |
609 | 609 | | |
610 | | - | |
| 610 | + | |
611 | 611 | | |
612 | 612 | | |
613 | 613 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3674 | 3674 | | |
3675 | 3675 | | |
3676 | 3676 | | |
| 3677 | + | |
| 3678 | + | |
| 3679 | + | |
3677 | 3680 | | |
| 3681 | + | |
3678 | 3682 | | |
3679 | 3683 | | |
3680 | 3684 | | |
3681 | | - | |
| 3685 | + | |
3682 | 3686 | | |
3683 | 3687 | | |
3684 | 3688 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1963 | 1963 | | |
1964 | 1964 | | |
1965 | 1965 | | |
| 1966 | + | |
| 1967 | + | |
| 1968 | + | |
| 1969 | + | |
1966 | 1970 | | |
1967 | 1971 | | |
1968 | 1972 | | |
| |||
2001 | 2005 | | |
2002 | 2006 | | |
2003 | 2007 | | |
2004 | | - | |
2005 | | - | |
2006 | | - | |
2007 | | - | |
2008 | 2008 | | |
2009 | 2009 | | |
2010 | 2010 | | |
| |||
0 commit comments