Browse Source

Disable Jetpack Google Fonts

Grant Kinney 3 years ago
parent
commit
1620884811
2 changed files with 8 additions and 1 deletions
  1. 7 0
      blockbase/functions.php
  2. 1 1
      blockbase/theme.json

+ 7 - 0
blockbase/functions.php

@@ -174,3 +174,10 @@ require get_template_directory() . '/inc/block-patterns.php';
 if ( file_exists( get_stylesheet_directory() . '/inc/block-patterns.php' ) ) {
 	require_once get_stylesheet_directory() . '/inc/block-patterns.php';
 }
+
+function blockbase_disable_jetpack_google_fonts() {
+	if ( method_exists( 'Jetpack', 'is_module_active' ) && Jetpack::is_module_active( 'google-fonts' ) ) {
+		Jetpack::deactivate_module( 'google-fonts' );
+	}
+}
+add_action( 'setup_theme', 'blockbase_disable_jetpack_google_fonts', 0 );

+ 1 - 1
blockbase/theme.json

@@ -375,7 +375,7 @@
 				{
 					"fontFamily": "\"Arvo\", serif",
 					"slug": "arvo",
-					"name": "\"Arvo\", serif",
+					"name": "Arvo",
 					"google": "family=Arvo:ital,wght@0,400;0,700;1,400;1,700"
 				}
 			],