diff --git a/projects/plugins/jetpack/changelog/fix-site-title-block-block-style-missing b/projects/plugins/jetpack/changelog/fix-site-title-block-block-style-missing new file mode 100644 index 0000000000000..319191bdbe558 --- /dev/null +++ b/projects/plugins/jetpack/changelog/fix-site-title-block-block-style-missing @@ -0,0 +1,4 @@ +Significance: patch +Type: bugfix + +Set the `Automattic\Jetpack\Fonts\Introspectors\Global_Styles::enqueue_global_styles_fonts` callback priority in the `init` hook to 22 to prevent it from causing style issues with sites that have Gutenberg > 13.5 activated. diff --git a/projects/plugins/jetpack/modules/google-fonts.php b/projects/plugins/jetpack/modules/google-fonts.php index 7d9f91fec524b..501cc9bdbfb54 100644 --- a/projects/plugins/jetpack/modules/google-fonts.php +++ b/projects/plugins/jetpack/modules/google-fonts.php @@ -104,4 +104,7 @@ function jetpack_add_google_fonts_provider() { add_filter( 'wp_resource_hints', '\Automattic\Jetpack\Fonts\Utils::font_source_resource_hint', 10, 2 ); add_filter( 'pre_render_block', '\Automattic\Jetpack\Fonts\Introspectors\Blocks::enqueue_block_fonts', 10, 2 ); -add_action( 'init', '\Automattic\Jetpack\Fonts\Introspectors\Global_Styles::enqueue_global_styles_fonts' ); +// The priority for the next hook is is set to 22 because it needs to run after Gutenberg's +// re-registration (at priority 22) of the core blocks it de-registers (at the default priority 10), +// otherwise Gutenberg caches an incorrect state. +add_action( 'init', '\Automattic\Jetpack\Fonts\Introspectors\Global_Styles::enqueue_global_styles_fonts', 22 );