Gutenberg Blocks Support
-
Since support for Gutenberg blocks was added in 3.8.0 sites still using WP <5 are now breaking as there is no register_block_type function.
Adding an if statement round the link in the __construct function in Blocks.php checking for the existence of this function would rectify this.
public function __construct() { add_filter( 'block_categories', [ $this, 'register_block_categories' ], 10, 2 ); add_action( 'init', [ $this, 'register_scripts' ] ); if ( function_exists( 'register_block_type' ) ) { add_action( 'init', [ $this, 'register_blocks' ] ); } add_action( 'wp_ajax_vczapi_get_zoom_hosts', [ $this, 'get_hosts' ] ); add_action( 'wp_ajax_vczapi_get_live_meetings', [ $this, 'get_live_meetings' ] ); }
Cheers
Greg
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Gutenberg Blocks Support’ is closed to new replies.