'; } public function key() { return 'big_headline'; } public function title() { return 'Big Headline'; } public function description() { return 'A big bold and beautiful headline.'; } public function enqueueScript() { return ACF_ENGINE_URL . 'src/BlockType/BigHeadline/assets/script.js'; } public function renderCallback() { return [$this, 'callback']; } public function callback( $block, $content, $isPreview, $postId ) { if( $isPreview ) { $previewPost = $this->getPreviewPost( $postId ); $postId = $previewPost->ID; } $this->render( $block, $content, $postId ); } protected function render( $block, $content, $postId ) { $value = get_field('text'); $size = get_field('size'); $color = get_field('color'); $value = $this->replaceDynamicTags( $value, $postId ); print '