Skip to content

Commit

Permalink
Comment out API functions in Resolver for testing stopgap.
Browse files Browse the repository at this point in the history
  • Loading branch information
hellofromtonya committed Apr 21, 2022
1 parent 6347e92 commit fb00786
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions lib/experimental/class-wp-theme-json-resolver-gutenberg.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,26 @@ public static function get_theme_data( $deprecated = array(), $settings = array(
if ( null === static::$theme ) {
$theme_json_data = static::read_json_file( static::get_file_path_from_theme( 'theme.json' ) );
$theme_json_data = static::translate( $theme_json_data, wp_get_theme()->get( 'TextDomain' ) );
$theme_json_data = gutenberg_add_registered_webfonts_to_theme_json( $theme_json_data );

/*
* DO NOT MERGE THIS CODE CHANGE.
*
* Commenting this out to avoid fatal error when testing the stopgap.
*/
// $theme_json_data = gutenberg_add_registered_webfonts_to_theme_json( $theme_json_data );
static::$theme = new WP_Theme_JSON_Gutenberg( $theme_json_data );

if ( wp_get_theme()->parent() ) {
// Get parent theme.json.
$parent_theme_json_data = static::read_json_file( static::get_file_path_from_theme( 'theme.json', true ) );
$parent_theme_json_data = static::translate( $parent_theme_json_data, wp_get_theme()->parent()->get( 'TextDomain' ) );
$parent_theme_json_data = gutenberg_add_registered_webfonts_to_theme_json( $parent_theme_json_data );

/*
* DO NOT MERGE THIS CODE CHANGE.
*
* Commenting this out to avoid fatal error when testing the stopgap.
*/
// $parent_theme_json_data = gutenberg_add_registered_webfonts_to_theme_json( $parent_theme_json_data );
$parent_theme = new WP_Theme_JSON_Gutenberg( $parent_theme_json_data );

// Merge the child theme.json into the parent theme.json.
Expand Down

0 comments on commit fb00786

Please sign in to comment.