'ctb-countdown-time-editor-style', 'render_callback' => [$this, 'render'] ] ); wp_set_script_translations( 'ctb-countdown-time-editor-script', 'countdown-time', CTB_DIR_PATH . '/languages' ); } function render( $attributes, $content ){ extract( $attributes ); wp_enqueue_style( 'ctb-countdown-time-style' ); wp_enqueue_script( 'ctb-countdown-time-script', CTB_DIR_URL . 'dist/script.js', [ 'react', 'react-dom' ], CTB_VERSION, true ); wp_set_script_translations( 'ctb-countdown-time-script', 'countdown-time', CTB_DIR_PATH . '/languages' ); $className = $className ?? ''; $extraClass = ctbIsPremium() ? 'premium' : 'free'; $blockClassName = "wp-block-ctb-countdown-time $extraClass $className align$align"; ob_start(); ?>