Update block theme check to work in WP 5.9 without Gutenberg enabled
This commit is contained in:
parent
baadffe3a6
commit
91d2b68769
|
@ -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
|
* @since x.x.x
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
function wc_current_theme_is_fse_theme() {
|
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' ) ) {
|
if ( function_exists( 'gutenberg_is_fse_theme' ) ) {
|
||||||
return (bool) gutenberg_is_fse_theme();
|
return (bool) gutenberg_is_fse_theme();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue