Changeset 63663
- Timestamp:
- 09/17/2026 05:32:43 PM (2 months ago)
- File:
-
- 1 edited
-
trunk/src/wp-includes/block-template-utils.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/block-template-utils.php
r63542 r63663 343 343 foreach ( $themes as $theme_slug => $theme_dir ) { 344 344 $template_base_paths = get_block_theme_folders( $theme_slug ); 345 $file_path = $theme_dir . '/' . $template_base_paths[ $template_type ] . '/' . $slug . '.html'; 346 if ( file_exists( $file_path ) ) { 345 $template_dir = $theme_dir . '/' . $template_base_paths[ $template_type ]; 346 $file_path = $template_dir . '/' . $slug . '.html'; 347 $template_file = realpath( $file_path ); 348 $template_root = realpath( $template_dir ); 349 350 if ( 351 false !== $template_file && 352 false !== $template_root && 353 str_starts_with( 354 wp_normalize_path( $template_file ), 355 trailingslashit( wp_normalize_path( $template_root ) ) 356 ) 357 ) { 347 358 $new_template_item = array( 348 359 'slug' => $slug, 349 'path' => $ file_path,360 'path' => $template_file, 350 361 'theme' => $theme_slug, 351 362 'type' => $template_type,
Note:
See TracChangeset
for help on using the changeset viewer.