wpseek.com
Uma área de pesquisa sobre o WordPress para devs e autores do tema



wp_is_block_theme › WordPress Function

Desde5.9.0
Obsoleton/a
› wp_is_block_theme ( Sem parâmetros )
Retorna:
  • (bool) Whether the active theme is a block-based theme or not.
Definido em:
Codex:

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



Fonte

function wp_is_block_theme() {
	if ( empty( $GLOBALS['wp_theme_directories'] ) ) {
		_doing_it_wrong( __FUNCTION__, __( 'This function should not be called before the theme directory is registered.' ), '6.8.0' );
		return false;
	}

	return wp_get_theme()->is_block_theme();
}