wp_is_block_theme() WordPress Function

The wp_is_block_theme() function is used to check if the current theme is a block-based theme. A block-based theme is a theme that uses the new block editor interface introduced in WordPress 5.0. This editor interface allows you to create and edit your content using blocks. If you are using a block-based theme, this function will return true. Otherwise, it will return false.

wp_is_block_theme() #

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


Return

(boolean) Whether the active theme is a block-based theme or not.


Top ↑

Source

File: wp-includes/theme.php

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


Top ↑

Changelog

Changelog
VersionDescription
5.9.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.

Show More