wpseek.com
WordPress开发者和主题制作者的搜索引擎



wp_enable_block_templates › WordPress Function

Since5.8.0
已弃用n/a
wp_enable_block_templates ( 没有参数 )
访问:
  • private
定义在:
文档:

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



源码

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