W3cubDocs

/WordPress

wp_is_block_theme(): bool

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

Return

bool Whether the active theme is a block-based theme or not.

Source

function wp_is_block_theme() {
	return wp_get_theme()->is_block_theme();
}

Changelog

Version Description
5.9.0 Introduced.

© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/wp_is_block_theme