- Timestamp:
- 11/11/2022 04:29:27 PM (2 years ago)
- Location:
- branches/6.1
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/6.1
-
branches/6.1/src/wp-includes/class-wp-theme-json-resolver.php
r54800 r54818 244 244 } 245 245 246 $options = wp_parse_args( $options, array( 'with_supports' => true ) );246 $options = wp_parse_args( $options, array( 'with_supports' => true ) ); 247 247 248 248 if ( null === static::$theme || ! static::has_same_registered_blocks( 'theme' ) ) { 249 249 $theme_json_file = static::get_file_path_from_theme( 'theme.json' ); 250 $wp_theme = wp_get_theme(); 250 251 if ( '' !== $theme_json_file ) { 251 252 $theme_json_data = static::read_json_file( $theme_json_file ); 252 $theme_json_data = static::translate( $theme_json_data, wp_get_theme()->get( 'TextDomain' ) );253 $theme_json_data = static::translate( $theme_json_data, $wp_theme->get( 'TextDomain' ) ); 253 254 } else { 254 255 $theme_json_data = array(); … … 266 267 static::$theme = new WP_Theme_JSON( $theme_json_data ); 267 268 268 if ( wp_get_theme()->parent() ) {269 if ( $wp_theme->parent() ) { 269 270 // Get parent theme.json. 270 271 $parent_theme_json_file = static::get_file_path_from_theme( 'theme.json', true ); 271 272 if ( '' !== $parent_theme_json_file ) { 272 273 $parent_theme_json_data = static::read_json_file( $parent_theme_json_file ); 273 $parent_theme_json_data = static::translate( $parent_theme_json_data, wp_get_theme()->parent()->get( 'TextDomain' ) );274 $parent_theme_json_data = static::translate( $parent_theme_json_data, $wp_theme->parent()->get( 'TextDomain' ) ); 274 275 $parent_theme = new WP_Theme_JSON( $parent_theme_json_data ); 275 276
Note: See TracChangeset
for help on using the changeset viewer.