Changeset 56330 for branches/6.3
- Timestamp:
- 08/01/2023 04:22:42 AM (16 months ago)
- Location:
- branches/6.3
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/6.3
-
branches/6.3/src/wp-includes/block-template-utils.php
r56288 r56330 361 361 } 362 362 363 /* 364 * The child theme items (stylesheet) are processed before the parent theme's (template). 365 * If a child theme defines a template, prevent the parent template from being added to the list as well. 366 */ 367 if ( isset( $template_files[ $template_slug ] ) ) { 368 continue; 369 } 370 363 371 $new_template_item = array( 364 372 'slug' => $template_slug, … … 371 379 $candidate = _add_block_template_part_area_info( $new_template_item ); 372 380 if ( ! isset( $area ) || ( isset( $area ) && $area === $candidate['area'] ) ) { 373 $template_files[ ] = $candidate;381 $template_files[ $template_slug ] = $candidate; 374 382 } 375 383 } … … 381 389 ( $post_type && isset( $candidate['postTypes'] ) && in_array( $post_type, $candidate['postTypes'], true ) ) 382 390 ) { 383 $template_files[ ] = $candidate;391 $template_files[ $template_slug ] = $candidate; 384 392 } 385 393 } … … 387 395 } 388 396 389 return $template_files;397 return array_values( $template_files ); 390 398 } 391 399
Note: See TracChangeset
for help on using the changeset viewer.