mirror of
git://develop.git.wordpress.org/
synced 2025-03-20 03:49:54 +01:00
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. git-svn-id: https://develop.svn.wordpress.org/trunk@52347 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
59633f8198
commit
f7d2a2ee9d
@ -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' );
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user