Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: George Mamadashvili <georgemamadashvili@gmail.com>
  • Loading branch information
spacedmonkey and Mamaduka authored Jun 19, 2023
1 parent bb8fa91 commit 9d55418
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/block-library/src/template-part/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ function render_block_core_template_part( $attributes ) {

foreach ( $themes as $theme ) {
$theme_folders = get_block_theme_folders( $theme );
$template_part_file_path = get_theme_file_path( '/' . $theme_folders['wp_template_part'] . '/' . $theme_folders['slug'] . '.html' );
$template_part_file_path = get_theme_file_path( '/' . $theme_folders['wp_template_part'] . '/' . $attributes['slug'] . '.html' );
if ( file_exists( $template_part_file_path ) ) {
$content = (string) file_get_contents( $template_part_file_path );
$content = '' !== $content ? _inject_theme_attribute_in_block_template_content( $content ) : '';
Expand Down

0 comments on commit 9d55418

Please sign in to comment.