blocks.php
647 Bytes
<?php
// Exit if accessed directly.
defined( 'ABSPATH' ) || exit;
add_action('acf/init', 'my_acf_init_block_types');
function my_acf_init_block_types() {
// Check function exists.
if( function_exists('acf_register_block_type') ) {
acf_register_block_type( array(
'title' => __( 'Work', 'client_textdomain' ),
'name' => 'carousel',
'render_template' => 'blocks/work/work.php',
'mode' => 'edit',
'supports' => [
'align' => false,
'anchor' => true,
'customClassName' => true
]
));
}
}