Skip to content

Commit

Permalink
Remove no longer necessary fallback
Browse files Browse the repository at this point in the history
  • Loading branch information
oandregal committed Aug 5, 2021
1 parent 9e2fc57 commit 112e35c
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions lib/class-wp-theme-json-resolver-gutenberg.php
Original file line number Diff line number Diff line change
Expand Up @@ -272,10 +272,6 @@ public static function get_core_data() {
public static function get_theme_data( $theme_support_data = array() ) {
if ( null === self::$theme ) {
$theme_json_data = self::read_json_file( self::get_file_path_from_theme( 'theme.json' ) );
// Fallback to experimental-theme.json.
if ( empty( $theme_json_data ) ) {
$theme_json_data = self::read_json_file( self::get_file_path_from_theme( 'experimental-theme.json' ) );
}
$theme_json_data = self::translate( $theme_json_data, wp_get_theme()->get( 'TextDomain' ) );
self::$theme = new WP_Theme_JSON_Gutenberg( $theme_json_data );
}
Expand Down Expand Up @@ -481,10 +477,6 @@ public static function get_user_custom_post_type_id() {
public static function theme_has_support() {
if ( ! isset( self::$theme_has_support ) ) {
self::$theme_has_support = (bool) self::get_file_path_from_theme( 'theme.json' );
if ( ! self::$theme_has_support ) {
// Fallback to experimental-theme.json.
self::$theme_has_support = (bool) self::get_file_path_from_theme( 'experimental-theme.json' );
}
}

return self::$theme_has_support;
Expand Down

0 comments on commit 112e35c

Please sign in to comment.