Skip to content

Instantly share code, notes, and snippets.

@NielsPilon NielsPilon/functions.php
Last active Nov 29, 2018

Embed
What would you like to do?
Gutenberg block registreren
<?php
add_action('acf/init', 'my_acf_init');
function my_acf_init() {
// check of de functie bestaat
if( function_exists('acf_register_block') ) {
// Custom Testimonail block registrerend
acf_register_block(array(
'name' => 'testimonial',
'title' => __('Testimonial'),
'description' => __('Mijn ACF testimonial block.'),
'render_callback' => 'my_acf_block_render_callback',
'category' => 'layout', // Zie https://wordpress.org/gutenberg/handbook/block-api/
'icon' => 'admin-links', // Dashicon icon class naam
'keywords' => array( 'testimonial', 'quote' ),
));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.