do not show block for WP versions below 5.9 (#484)

* do not show block for WP versions below 5.9

* oops, wrong operator
This commit is contained in:
Matthias Pfefferle 2023-10-04 08:32:21 +02:00 committed by GitHub
parent d268bd9aee
commit 9466048bfb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -458,6 +458,10 @@ if ( ! function_exists( 'get_self_link' ) ) {
* @return boolean True if the site supports the block editor, false otherwise.
*/
function site_supports_blocks() {
if ( \version_compare( \get_bloginfo( 'version' ), '5.9', '<' ) ) {
return false;
}
if ( ! \function_exists( 'register_block_type_from_metadata' ) ) {
return false;
}