Skip to content

Commit

Permalink
Fixes #26010 - Template Part Not Found message on Windows server (#26772
Browse files Browse the repository at this point in the history
)
  • Loading branch information
bobbingwide authored Nov 26, 2020
1 parent 86977ae commit b46effd
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 @@ -45,7 +45,7 @@ function render_block_core_template_part( $attributes ) {
// Else, if the template part was provided by the active theme,
// render the corresponding file content.
$template_part_file_path = get_stylesheet_directory() . '/block-template-parts/' . $attributes['slug'] . '.html';
if ( 0 === validate_file( $template_part_file_path ) && file_exists( $template_part_file_path ) ) {
if ( 0 === validate_file( $attributes['slug'] ) && file_exists( $template_part_file_path ) ) {
$content = file_get_contents( $template_part_file_path );
}
}
Expand Down

0 comments on commit b46effd

Please sign in to comment.