Closed octoxan closed 3 years ago
Yes, this is needed in order to match the readme "Requires at least", which is 4.0.
Suggestion: rather than re-indenting the entire function and conditionally defining it, just insert this at the beginning of the function:
if ( ! function_exists( 'register_block_type' ) ) {
return;
}
Thanks!
Added a check for if Gutenberg exists and is enabled, to ensure compatibility with ClassicPress and the Classic Editor. Throws a 500 error currently on any site running the ClassicPress WP fork, or is for any other reason missing Gutenberg.