Changeset 56094 for trunk/src/wp-includes/global-styles-and-settings.php
- Timestamp:
- 06/28/2023 05:12:46 PM (19 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/global-styles-and-settings.php
r56085 r56094 408 408 } 409 409 410 $stylesheet_directory = get_stylesheet_directory(); 411 $template_directory = get_template_directory(); 412 410 413 // This is the same as get_theme_file_path(), which isn't available in load-styles.php context 411 if ( file_exists( get_stylesheet_directory(). '/theme.json' ) ) {412 $path = get_stylesheet_directory(). '/theme.json';414 if ( $stylesheet_directory !== $template_directory && file_exists( $stylesheet_directory . '/theme.json' ) ) { 415 $path = $stylesheet_directory . '/theme.json'; 413 416 } else { 414 $path = get_template_directory(). '/theme.json';417 $path = $template_directory . '/theme.json'; 415 418 } 416 419 … … 418 421 $path = apply_filters( 'theme_file_path', $path, 'theme.json' ); 419 422 420 if ( file_exists( $path ) ) { 421 $theme_has_support = true; 422 } else { 423 $theme_has_support = false; 424 } 423 $theme_has_support = file_exists( $path ); 425 424 426 425 return $theme_has_support;
Note: See TracChangeset
for help on using the changeset viewer.