diff --git a/src/wp-includes/blocks/template-part.php b/src/wp-includes/blocks/template-part.php index 107f20dbd35b5..d4521ba40b5f9 100644 --- a/src/wp-includes/blocks/template-part.php +++ b/src/wp-includes/blocks/template-part.php @@ -249,4 +249,8 @@ function register_block_core_template_part() { ) ); } -add_action( 'init', 'register_block_core_template_part' ); +/* + * This block relies on generated styles from previously registered blocks, so + * it should be registered last. + */ +add_action( 'init', 'register_block_core_template_part', 29 ); diff --git a/src/wp-includes/default-filters.php b/src/wp-includes/default-filters.php index 725f5ef3cbce5..fa3fd15a830e8 100644 --- a/src/wp-includes/default-filters.php +++ b/src/wp-includes/default-filters.php @@ -345,7 +345,7 @@ add_action( 'wp_print_footer_scripts', '_wp_footer_scripts' ); add_action( 'init', '_register_core_block_patterns_and_categories' ); add_action( 'init', 'check_theme_switched', 99 ); -add_action( 'init', array( 'WP_Block_Supports', 'init' ), 22 ); +add_action( 'init', array( 'WP_Block_Supports', 'init' ), 30 ); add_action( 'switch_theme', array( 'WP_Theme_JSON_Resolver', 'clean_cached_data' ) ); add_action( 'start_previewing_theme', array( 'WP_Theme_JSON_Resolver', 'clean_cached_data' ) ); add_action( 'after_switch_theme', '_wp_menus_changed' );