Changeset 56073 for trunk/src/wp-includes/class-wp-theme-json-resolver.php
- Timestamp:
- 06/27/2023 05:10:28 PM (19 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-theme-json-resolver.php
r55996 r56073 239 239 240 240 if ( null === static::$theme || ! static::has_same_registered_blocks( 'theme' ) ) { 241 $theme_json_file = static::get_file_path_from_theme( 'theme.json' );242 241 $wp_theme = wp_get_theme(); 243 if ( '' !== $theme_json_file ) { 242 $theme_json_file = $wp_theme->get_file_path( 'theme.json' ); 243 if ( is_readable( $theme_json_file ) ) { 244 244 $theme_json_data = static::read_json_file( $theme_json_file ); 245 245 $theme_json_data = static::translate( $theme_json_data, $wp_theme->get( 'TextDomain' ) ); … … 261 261 if ( $wp_theme->parent() ) { 262 262 // Get parent theme.json. 263 $parent_theme_json_file = static::get_file_path_from_theme( 'theme.json', true);264 if ( '' !== $parent_theme_json_file) {263 $parent_theme_json_file = $wp_theme->parent()->get_file_path( 'theme.json' ); 264 if ( $theme_json_file !== $parent_theme_json_file && is_readable( $parent_theme_json_file ) ) { 265 265 $parent_theme_json_data = static::read_json_file( $parent_theme_json_file ); 266 266 $parent_theme_json_data = static::translate( $parent_theme_json_data, $wp_theme->parent()->get( 'TextDomain' ) );
Note: See TracChangeset
for help on using the changeset viewer.