-
-
Save billerickson/7960927d3835ef3d2fa128c6b86dc3e5 to your computer and use it in GitHub Desktop.
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 | |
/** | |
* Register Blocks | |
* @see https://www.billerickson.net/building-gutenberg-block-acf/#register-block | |
* | |
*/ | |
function be_register_blocks() { | |
if( ! function_exists( 'acf_register_block_type' ) ) | |
return; | |
acf_register_block_type( array( | |
'name' => 'team-member', | |
'title' => __( 'Team Member', 'clientname' ), | |
'render_template' => 'partials/block-team-member.php', | |
'category' => 'formatting', | |
'icon' => 'admin-users', | |
'mode' => 'auto', | |
'keywords' => array( 'profile', 'user', 'author' ) | |
)); | |
} | |
add_action('acf/init', 'be_register_blocks' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment