Skip to content

Commit

Permalink
Cache reading theme.json files from styles/ folder.
Browse files Browse the repository at this point in the history
  • Loading branch information
oandregal committed Jun 17, 2024
1 parent b36ff60 commit 99bc097
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/wp-includes/class-wp-theme-json-resolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -751,7 +751,7 @@ public static function get_style_variations( $scope = 'theme' ) {
}
ksort( $variation_files );
foreach ( $variation_files as $path => $file ) {
$decoded_file = wp_json_file_decode( $path, array( 'associative' => true ) );
$decoded_file = self::read_json_file( $path );
if ( is_array( $decoded_file ) && static::style_variation_has_scope( $decoded_file, $scope ) ) {
$translated = static::translate( $decoded_file, wp_get_theme()->get( 'TextDomain' ) );
$variation = ( new WP_Theme_JSON( $translated ) )->get_raw_data();
Expand Down

0 comments on commit 99bc097

Please sign in to comment.