Skip to content

Commit

Permalink
make sure that ['anchor'] is always set, so we can just use {{ ['anch…
Browse files Browse the repository at this point in the history
…or'] }} without any checks
  • Loading branch information
tombroucke committed Mar 4, 2020
1 parent 12be0ef commit 9507ddb
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions sage-acf-gutenberg-blocks.php
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 9507ddb

Please # to comment.