Update block theme check to work in WP 5.9 without Gutenberg enabled

This commit is contained in:
Albert Juhé Lluveras 2021-12-29 11:10:14 +01:00
parent baadffe3a6
commit 91d2b68769
1 changed files with 4 additions and 1 deletions

View File

@ -484,12 +484,15 @@ function wc_is_file_valid_csv( $file, $check_path = true ) {
}
/**
* Check if the current theme is an FSE theme.
* Check if the current theme is a block theme.
*
* @since x.x.x
* @return bool
*/
function wc_current_theme_is_fse_theme() {
if ( function_exists( 'wp_is_block_theme' ) ) {
return (bool) wp_is_block_theme();
}
if ( function_exists( 'gutenberg_is_fse_theme' ) ) {
return (bool) gutenberg_is_fse_theme();
}