'bigb-image-gallery-editor-style', 'render_callback' => [$this, 'render'] ] ); // Register Block wp_set_script_translations( 'bigb-image-gallery-editor-script', 'image-gallery', BIGB_DIR_PATH . 'languages' ); } function render( $attributes ){ extract( $attributes ); wp_enqueue_style( 'bigb-image-gallery-style' ); wp_enqueue_script( 'bigb-image-gallery-script', BIGB_DIR_URL . 'dist/script.js', [ 'react', 'react-dom' ], false ); wp_set_script_translations( 'bigb-image-gallery-script', 'image-gallery', BIGB_DIR_PATH . 'languages' ); $className = $className ?? ''; $blockClassName = "wp-block-bigb-image-gallery $className align$align"; ob_start(); ?>