Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions lib/compat/wordpress-5.9/theme.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}