Make WordPress Core


Ignore:
Timestamp:
11/25/2021 10:57:19 AM (3 years ago)
Author:
youknowriad
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/theme.php

    r52110 r52247  
    40854085 */
    40864086function wp_is_block_template_theme() {
    4087     return is_readable( get_theme_file_path( '/block-templates/index.html' ) );
    4088 }
     4087    return is_readable( get_theme_file_path( '/block-templates/index.html' ) ) ||
     4088        is_readable( get_theme_file_path( '/templates/index.html' ) );
     4089}
Note: See TracChangeset for help on using the changeset viewer.