wpseek.com
A WordPress-centric search engine for devs and theme authors



wp_enable_block_templates › WordPress Function

Since5.8.0
Deprecatedn/a
wp_enable_block_templates ( No parameters )
Access:
  • private
Defined at:
Codex:

Enables the block templates (editor mode) for themes with theme.json by default.



Source

function wp_enable_block_templates() {
	if ( wp_is_block_theme() || wp_theme_has_theme_json() ) {
		add_theme_support( 'block-templates' );
	}
}