#59862 closed defect (bug) (wontfix)
should_load_separate_core_block_assets filter no longer forces loading of block styles
Reported by: | domainsupport | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 6.4 |
Component: | Script Loader | Keywords: | |
Focuses: | css | Cc: |
Description
We use the following code in v6.3.2 and earlier to force the loading of /wp-includes/css/dist/block-library/style.min.css
so that manually inserted blocks such as the Cover block or Columns block (via custom shortcodes) can still benefit from their block styles ...
add_action('setup_theme', 'my_setup_theme'); function my_setup_theme() { add_filter('should_load_separate_core_block_assets', '__return_false'); }
This no longer works in v6.4.1 and /wp-includes/css/dist/block-library/style.min.css
is not loaded.
We are using Twenty Twenty-Two theme.
Change History (2)
Note: See
TracTickets for help on using
tickets.
I've found a fix for this whereby adding a priority of 11 to the filter allows this to work again.
I'm going to add my findings to the notes for the filter https://developer.wordpress.org/reference/hooks/should_load_separate_core_block_assets/