array( $this, 'block_cookie_declaration' ), ) ); } /** * Cookiebot_WP Render Cookiebot Declaration as Gutenberg block * * @throws InvalidArgumentException * @since 3.7.0 * @version 3.7.0 */ public function block_cookie_declaration() { return Cookiebot_Declaration_Shortcode::show_declaration(); } /** * Cookiebot_WP Add block JS * * @throws InvalidArgumentException * @since 3.7.1 * @version 3.7.1 */ public function gutenberg_block_admin_assets() { // Add Gutenberg Widget wp_enqueue_script( 'cookiebot-declaration', asset_url( 'js/backend/gutenberg/cookie-declaration-gutenberg-block.js' ), array( 'wp-blocks', 'wp-i18n', 'wp-element' ), // Required scripts for the block Cookiebot_WP::COOKIEBOT_PLUGIN_VERSION, false ); } }