Browse Source

Update comment and Gutenberg version

Grant Kinney 3 years ago
parent
commit
1d08e2e10f
2 changed files with 5 additions and 3 deletions
  1. 4 2
      blockbase/functions.php
  2. 1 1
      blockbase/inc/customizer/wp-customize-fonts.php

+ 4 - 2
blockbase/functions.php

@@ -136,7 +136,9 @@ if ( file_exists( get_stylesheet_directory() . '/inc/block-patterns.php' ) ) {
 }
 
 
-// ----------	Custom Fonts ---------- //
+// ---------- Custom Fonts ---------- //
+// This code is adapted directly from Jetpack's Google Fonts module, which depends on the Webfonts API from Gutenberg (and eventually Core)
+// https://github.com/Automattic/jetpack/blob/master/projects/plugins/jetpack/modules/google-fonts.php
 const BLOCKBASE_GOOGLE_FONTS_LIST = array(
 	'Arvo',
 	'Bodoni Moda',
@@ -185,7 +187,7 @@ function blockbase_register_google_fonts() {
 	// Use jetpack's implementation of custom google fonts if it is already active
 	if ( method_exists( 'Jetpack', 'is_module_active' ) && Jetpack::is_module_active( 'google-fonts' ) ) {
 		return;
-	} 
+	}
 
 	if ( ! function_exists( 'wp_register_webfont_provider' ) || ! function_exists( 'wp_register_webfonts' ) ) {
 		return;

+ 1 - 1
blockbase/inc/customizer/wp-customize-fonts.php

@@ -133,7 +133,7 @@ class GlobalStylesFontsCustomizer {
 	}
 
 	function generate_deprecation_message() {
-		if ( ! defined( 'GUTENBERG_VERSION' ) || version_compare( GUTENBERG_VERSION, '13.2', '<=' ) ) {
+		if ( ! defined( 'GUTENBERG_VERSION' ) || version_compare( GUTENBERG_VERSION, '13.3', '<=' ) ) {
 			return __( 'Please activate or update Gutenberg to use the custom fonts feature.', 'blockbase' );
 		}