Changeset 56710 for trunk/src/wp-includes/blocks/template-part.php
- Timestamp:
- 09/26/2023 02:20:18 PM (3 years ago)
- File:
-
- 1 edited
-
trunk/src/wp-includes/blocks/template-part.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/blocks/template-part.php
r56320 r56710 68 68 // render the corresponding file content. 69 69 if ( 0 === validate_file( $attributes['slug'] ) ) { 70 $block_template_file = _get_block_template_file( 'wp_template_part', $attributes['slug'] ); 71 if ( $block_template_file ) { 72 $template_part_file_path = $block_template_file['path']; 73 $content = (string) file_get_contents( $template_part_file_path ); 74 $content = '' !== $content ? _inject_theme_attribute_in_block_template_content( $content ) : ''; 75 if ( isset( $block_template_file['area'] ) ) { 76 $area = $block_template_file['area']; 77 } 70 $block_template = get_block_file_template( $template_part_id, 'wp_template_part' ); 71 72 $content = $block_template->content; 73 if ( isset( $block_template->area ) ) { 74 $area = $block_template->area; 78 75 } 79 76 }
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)