diff --git a/plugins/carhop-blocks/acf-blocks/custom-video/block.json b/plugins/carhop-blocks/acf-blocks/custom-video/block.json new file mode 100644 index 0000000..cf931bf --- /dev/null +++ b/plugins/carhop-blocks/acf-blocks/custom-video/block.json @@ -0,0 +1,25 @@ +{ + "name": "acf/custom-video", + "title": "Vidéo Auto-hébergée", + "category": "carhop-blocks", + "multiple": true, + "icon": { + "foreground": "#136f63", + "src": "format-video" + }, + "keywords": [ + "vidéo", + "video", + "auto-hébergée" + ], + "supports": { + "align": [ + "full" + ] + }, + "acf": { + "mode": "auto", + "renderTemplate": "custom-video.php" + }, + "align": "full" +} \ No newline at end of file diff --git a/plugins/carhop-blocks/acf-blocks/custom-video/custom-video.php b/plugins/carhop-blocks/acf-blocks/custom-video/custom-video.php new file mode 100644 index 0000000..05fc014 --- /dev/null +++ b/plugins/carhop-blocks/acf-blocks/custom-video/custom-video.php @@ -0,0 +1,10 @@ + + +
+
+ +
+
\ No newline at end of file diff --git a/plugins/carhop-blocks/index.php b/plugins/carhop-blocks/index.php index b3e4219..a8e1ddc 100644 --- a/plugins/carhop-blocks/index.php +++ b/plugins/carhop-blocks/index.php @@ -56,6 +56,7 @@ function carhop_register_blocks() register_block_type(__DIR__ . '/acf-blocks/gallery'); register_block_type(__DIR__ . '/acf-blocks/social-networks'); + register_block_type(__DIR__ . '/acf-blocks/custom-video'); // Enregistrer le script pour le bloc gallery wp_register_script(