Themes: Auto-enable block-templates support for all block themes.
Block themes without theme.json file used to have block-templates support disabled. This commit brings this in sync with the behavior in the gutenberg plugin. See #54335. Built from https://develop.svn.wordpress.org/trunk@52347 git-svn-id: http://core.svn.wordpress.org/trunk@51939 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -211,7 +211,7 @@ function the_block_template_skip_link() {
|
||||
* @since 5.8.0
|
||||
*/
|
||||
function wp_enable_block_templates() {
|
||||
if ( WP_Theme_JSON_Resolver::theme_has_support() ) {
|
||||
if ( wp_is_block_theme() || WP_Theme_JSON_Resolver::theme_has_support() ) {
|
||||
add_theme_support( 'block-templates' );
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user