Skip to content

Commit

Permalink
check for the directory rather than the file
Browse files Browse the repository at this point in the history
  • Loading branch information
scruffian committed Dec 10, 2021
1 parent 28676a8 commit 84ef2a2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/compat/wordpress-5.9/block-template-utils.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ function get_block_theme_folders( $theme_stylesheet = null ) {
$parent_root_dir = get_theme_root( $parent_theme_name );
$parent_theme_dir = "$parent_root_dir/$parent_theme_name";

if ( is_readable( $theme_dir . '/block-templates/index.html' ) || is_readable( $parent_theme_dir . '/block-templates/index.html' ) ) {
if ( is_readable( $theme_dir . '/block-templates/' ) || is_readable( $parent_theme_dir . '/block-templates/' ) ) {
return array(
'wp_template' => 'block-templates',
'wp_template_part' => 'block-template-parts',
Expand Down

0 comments on commit 84ef2a2

Please sign in to comment.