From 699a2efe1b84b66d7f123dea4d16ac2359e64e62 Mon Sep 17 00:00:00 2001 From: Antoine M Date: Mon, 13 Oct 2025 11:15:22 +0200 Subject: [PATCH] =?UTF-8?q?FEATURE=20Introducing=20block=20custom=20vid?= =?UTF-8?q?=C3=A9o?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../acf-blocks/custom-video/block.json | 25 +++++++++++++++++++ .../acf-blocks/custom-video/custom-video.php | 10 ++++++++ plugins/carhop-blocks/index.php | 1 + 3 files changed, 36 insertions(+) create mode 100644 plugins/carhop-blocks/acf-blocks/custom-video/block.json create mode 100644 plugins/carhop-blocks/acf-blocks/custom-video/custom-video.php 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(