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.
Source
File: wp-includes/theme.php
function wp_is_block_theme() { return wp_get_theme()->is_block_theme(); }
Expand full source codeCollapse full source codeView on TracView on GitHub
Changelog
Version | Description |
---|---|
5.9.0 | Introduced. |