From 9507ddb060c2d8cef412df4272092996d4d22144 Mon Sep 17 00:00:00 2001 From: Tom Broucke Date: Wed, 4 Mar 2020 10:48:47 +0100 Subject: [PATCH] make sure that ['anchor'] is always set, so we can just use {{ ['anchor'] }} without any checks --- sage-acf-gutenberg-blocks.php | 1 + 1 file changed, 1 insertion(+) diff --git a/sage-acf-gutenberg-blocks.php b/sage-acf-gutenberg-blocks.php index 5685642..3efe3f4 100644 --- a/sage-acf-gutenberg-blocks.php +++ b/sage-acf-gutenberg-blocks.php @@ -154,6 +154,7 @@ function sage_blocks_callback($block, $content = '', $is_preview = false, $post_ $block['is_preview'] = $is_preview; $block['content'] = $content; $block['slug'] = $slug; + $block['anchor'] = isset($block['anchor']) ? $block['anchor'] : ''; // Send classes as array to filter for easy manipulation. $block['classes'] = [ $slug,