Created
October 28, 2018 23:15
-
-
Save palmiak/68224a18acab87951d64859a6f659a09 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 | |
add_action('acf/init', 'my_acf_init'); | |
function my_acf_init() { | |
// sprawdzamy czy funkcja istnieje | |
if( function_exists('acf_register_block') ) { | |
// rejestrujemy blok | |
acf_register_block(array( | |
'name' => 'testimonial', | |
'title' => __('Testimonial'), | |
'description' => __('A custom testimonial block.'), | |
'render_callback' => 'my_acf_block_render_callback', | |
'category' => 'formatting', | |
'icon' => 'admin-comments', | |
'keywords' => array( 'testimonial', 'quote' ), | |
)); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment