ENQUEUE Block gallery and its view.js

This commit is contained in:
Antoine M 2025-07-01 16:52:00 +02:00
parent 9fde5d1409
commit 7b9d16d5b3

View File

@ -48,6 +48,18 @@ function carhop_register_blocks()
register_block_type(__DIR__ . '/blocks/decorative-shapes/build');
register_block_type(__DIR__ . '/blocks/narrative-card/build');
register_block_type(__DIR__ . '/blocks/scroll-story-block/build');
register_block_type(__DIR__ . '/acf-blocks/gallery');
// Enregistrer le script pour le bloc gallery
wp_register_script(
'carhop-gallery-view',
plugins_url('acf-blocks/gallery/view.js', __FILE__),
array(),
filemtime(__DIR__ . '/acf-blocks/gallery/view.js'),
true
);
}
add_action('init', 'carhop_register_blocks');