Created
April 30, 2019 13:24
-
-
Save benplum/e3572a14d708614c619218c36157bee6 to your computer and use it in GitHub Desktop.
register-blocks.php
This file contains 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
<?php | |
function editor_register_blocks() { | |
if ( function_exists('acf_register_block') ) { | |
acf_register_block(array( | |
'name' => 'testimonial', | |
'title' => __('Testimonial'), | |
'description' => __('A custom testimonial block.'), | |
'render_template' => 'blocks/testimonial.php', | |
'category' => 'formatting', | |
)); | |
} | |
} | |
add_action( 'acf/init', 'editor_register_blocks' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment