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



wp_is_block_template_theme › WordPress Function

Since5.9.0
Deprecatedn/a
wp_is_block_template_theme ( No parameters )
Returns:
  • (bool) Whether the current theme is a block-based theme or not.
Defined at:
Codex:

Returns whether the current theme is a block-based theme or not.



Source

function wp_is_block_template_theme() {
	return is_readable( get_theme_file_path( '/block-templates/index.html' ) ) ||
		is_readable( get_theme_file_path( '/templates/index.html' ) );
}