浏览代码

Stop using WP_THeme_JSON class to process data as it was causing cacheing issues

Jason Crist 3 年之前
父节点
当前提交
fdab37d45b
共有 1 个文件被更改,包括 1 次插入2 次删除
  1. 1 2
      blockbase/inc/fonts/custom-fonts.php

+ 1 - 2
blockbase/inc/fonts/custom-fonts.php

@@ -120,8 +120,7 @@ function extract_font_slug_from_setting( $setting ) {
 function collect_fonts_from_blockbase() {
 	$fonts                  = array();
 	$parent_theme_json_data = json_decode( file_get_contents( get_template_directory() . '/theme.json' ), true );
-	$parent_theme           = new WP_Theme_JSON( $parent_theme_json_data );
-	$font_families          = $parent_theme->get_data()['settings']['typography']['fontFamilies'];
+	$font_families          = $parent_theme_json_data['settings']['typography']['fontFamilies'];
 
 	foreach ( $font_families as $font ) {
 		// Only pick it up if we're claiming it as ours to manage