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:
parent
d268bd9aee
commit
9466048bfb
1 changed files with 4 additions and 0 deletions
|
@ -458,6 +458,10 @@ if ( ! function_exists( 'get_self_link' ) ) {
|
||||||
* @return boolean True if the site supports the block editor, false otherwise.
|
* @return boolean True if the site supports the block editor, false otherwise.
|
||||||
*/
|
*/
|
||||||
function site_supports_blocks() {
|
function site_supports_blocks() {
|
||||||
|
if ( \version_compare( \get_bloginfo( 'version' ), '5.9', '<' ) ) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if ( ! \function_exists( 'register_block_type_from_metadata' ) ) {
|
if ( ! \function_exists( 'register_block_type_from_metadata' ) ) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue