Created
September 8, 2021 15:41
-
-
Save thetwopct/d5e17c9bafbbfcdb5913359712cd7a77 to your computer and use it in GitHub Desktop.
Register an ACF Block (Gutenberg) with API v2 options
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// register the dots background block. | |
acf_register_block_type( | |
array( | |
'name' => 'section-dots', | |
'title' => 'Section - Dots', | |
'description' => 'A full width section similar to group block to allow for dots background image.', | |
'render_template' => get_template_directory() . '/theme-parts/blocks/section-dots.php', | |
'enqueue_style' => get_template_directory() . '/theme-parts/blocks/section-dots.css', | |
'mode' => 'preview', | |
'icon' => 'format-aside', | |
'keywords' => ['section', 'group', 'dots'], | |
'supports' => [ | |
'align' => false, | |
'align_content' => true, | |
'align_text' => true, | |
'color' => [ | |
'text' => true, | |
'background' => true, | |
'link' => true, | |
], | |
'border' => [ | |
'radius' => true, | |
'width' => true, | |
'style' => true, | |
'color' => true, | |
], | |
'spacing' => [ | |
'padding' => true, | |
], | |
'full_height' => true, | |
'anchor' => true, | |
'customClassName' => true, | |
'jsx' => true, | |
], | |
) | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment