Themes: Update the base folders for templates and template parts in block themes.
Block Themes should now use the following folders: - templates instead of block-templates - parts instead of block-template-parts Existing themes and folders will continue to work without impact. Props bernhard-reiter. Fixes #54493. Built from https://develop.svn.wordpress.org/trunk@52247 git-svn-id: http://core.svn.wordpress.org/trunk@51839 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -4084,5 +4084,6 @@ function create_initial_theme_features() {
|
||||
* @return boolean Whether the current theme is a block-based theme or not.
|
||||
*/
|
||||
function wp_is_block_template_theme() {
|
||||
return is_readable( get_theme_file_path( '/block-templates/index.html' ) );
|
||||
return is_readable( get_theme_file_path( '/block-templates/index.html' ) ) ||
|
||||
is_readable( get_theme_file_path( '/templates/index.html' ) );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user