diff --git a/lib/compat/wordpress-5.9/theme.php b/lib/compat/wordpress-5.9/theme.php index 43862e6bf6117a..7bfe11f604c5b6 100644 --- a/lib/compat/wordpress-5.9/theme.php +++ b/lib/compat/wordpress-5.9/theme.php @@ -16,3 +16,13 @@ function wp_is_block_theme() { is_readable( get_theme_file_path( '/templates/index.html' ) ); } } + +/** + * Note: We have to maintain this function for backward compatibility with WP 5.8. + * The `validate_theme_requirements` method is using `gutenberg_is_fse_theme` in older versions of WP. + * + * @return boolean Whether the current theme is a block theme or not. + */ +function gutenberg_is_fse_theme() { + return wp_is_block_theme(); +}