Changeset 56085
- Timestamp:
- 06/28/2023 05:55:04 AM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/global-styles-and-settings.php
r56073 r56085 408 408 } 409 409 410 // Does the theme have its own theme.json? 411 $theme_has_support = is_readable( get_theme_file_path( 'theme.json' ) ); 410 // 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'; 413 } else { 414 $path = get_template_directory() . '/theme.json'; 415 } 416 417 /** This filter is documented in wp-includes/link-template.php */ 418 $path = apply_filters( 'theme_file_path', $path, 'theme.json' ); 419 420 if ( file_exists( $path ) ) { 421 $theme_has_support = true; 422 } else { 423 $theme_has_support = false; 424 } 412 425 413 426 return $theme_has_support;
Note: See TracChangeset
for help on using the changeset viewer.