blocks.php
814 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' => __( 'Carousel', 'client_textdomain' ),
'name' => 'carousel',
'render_template' => 'blocks/carousel/carousel.php',
'mode' => 'edit',
'supports' => [
'align' => false,
'anchor' => true,
'customClassName' => true
]
));
wp_enqueue_style('call-out-block', get_stylesheet_directory_uri() . '/blocks/call-out-block/style.css', array(), '1.0.1' );
}
}