From 5d6d9b53eb214d5e45611e1bda652d5eb7e759d6 Mon Sep 17 00:00:00 2001 From: Keith Solomon Date: Sat, 13 Jun 2026 11:33:02 -0500 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9E=20fix:=20Update=20media=20text=20b?= =?UTF-8?q?lock=20styling?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- acf/group_645e7cf448e66.json | 43 ++++++++---------- views/blocks/media-text/block.json | 60 +++++++++++++------------- views/blocks/media-text/media-text.php | 8 ++-- 3 files changed, 53 insertions(+), 58 deletions(-) diff --git a/acf/group_645e7cf448e66.json b/acf/group_645e7cf448e66.json index a15dbe9..2acded2 100644 --- a/acf/group_645e7cf448e66.json +++ b/acf/group_645e7cf448e66.json @@ -2,24 +2,6 @@ "key": "group_645e7cf448e66", "title": "Media With Text Block", "fields": [ - { - "key": "field_645e7cf4c6700", - "label": "Background Color", - "name": "background_color", - "aria-label": "", - "type": "color_picker", - "instructions": "", - "required": 0, - "conditional_logic": 0, - "wrapper": { - "width": "", - "class": "", - "id": "" - }, - "default_value": "", - "enable_opacity": 0, - "return_format": "string" - }, { "key": "field_645e7d22c6701", "label": "Is Dark", @@ -64,7 +46,9 @@ "allow_null": 0, "ui": 0, "ajax": 0, - "placeholder": "" + "placeholder": "", + "create_options": 0, + "save_options": 0 }, { "key": "field_645e7e2cc6703", @@ -270,7 +254,9 @@ "ui": 0, "ajax": 0, "placeholder": "", - "parent_repeater": "field_645e7f85c6709" + "parent_repeater": "field_645e7f85c6709", + "create_options": 0, + "save_options": 0 }, { "key": "field_646501305f6db", @@ -297,7 +283,9 @@ "ui": 0, "ajax": 0, "placeholder": "", - "parent_repeater": "field_645e7f85c6709" + "parent_repeater": "field_645e7f85c6709", + "create_options": 0, + "save_options": 0 }, { "key": "field_646501565f6dc", @@ -325,7 +313,9 @@ "ui": 0, "ajax": 0, "placeholder": "", - "parent_repeater": "field_645e7f85c6709" + "parent_repeater": "field_645e7f85c6709", + "create_options": 0, + "save_options": 0 }, { "key": "field_646501735f6dd", @@ -355,7 +345,9 @@ "ui": 0, "ajax": 0, "placeholder": "", - "parent_repeater": "field_645e7f85c6709" + "parent_repeater": "field_645e7f85c6709", + "create_options": 0, + "save_options": 0 } ] } @@ -385,5 +377,8 @@ "active": true, "description": "", "show_in_rest": 0, - "modified": 1742680440 + "display_title": "", + "allow_ai_access": false, + "ai_description": "", + "modified": 1781367288 } diff --git a/views/blocks/media-text/block.json b/views/blocks/media-text/block.json index 13d7cfe..2b82f4f 100644 --- a/views/blocks/media-text/block.json +++ b/views/blocks/media-text/block.json @@ -1,31 +1,33 @@ { - "name": "acf/media-text", - "title": "Media With Text Block", - "description": "2 column content with image and optional calls-to-action", - "style": [ - "file:./media-text.css" - ], - "category": "vdi-blocks", - "icon": "screenoptions", - "keywords": [ - "media", - "media-text", - "image", - "video", - "text", - "columns" - ], - "acf": { - "mode": "preview", - "renderTemplate": "media-text.php" - }, - "supports": { - "align": true, - "anchor": true, - "color": true, - "html": true, - "jsx": true, - "mode": true, - "multiple": true - } + "name": "acf/media-text", + "title": "Media With Text Block", + "apiVersion": 3, + "description": "2 column content with image and optional calls-to-action", + "style": [ + "file:./media-text.css" + ], + "category": "vdi-blocks", + "icon": "screenoptions", + "keywords": [ + "media", + "media-text", + "image", + "video", + "text", + "columns" + ], + "acf": { + "blockVersion": 3, + "mode": "preview", + "renderTemplate": "media-text.php" + }, + "supports": { + "align": true, + "anchor": true, + "color": true, + "html": false, + "jsx": true, + "mode": true, + "multiple": true + } } diff --git a/views/blocks/media-text/media-text.php b/views/blocks/media-text/media-text.php index 76c8599..3d92e0d 100644 --- a/views/blocks/media-text/media-text.php +++ b/views/blocks/media-text/media-text.php @@ -10,7 +10,6 @@ namespace CWC; // Retrieve ACF fields -$bgColor = get_field( 'background_color' ) ? get_field( 'background_color' ) : '#c5c5c5'; $isDark = get_field( 'is_dark' ) ? get_field( 'is_dark' ) : false; $mediaLeft = get_field( 'media_on_left' ) ? get_field( 'media_on_left' ) : false; $vidBlock = get_field( 'video' ) ? get_field( 'video' ) : ''; @@ -24,10 +23,9 @@ $content = get_field( 'content' ) ? get_field( 'content' ) : ''; $ctas = get_field( 'calls_to_action' ) ? get_field( 'calls_to_action' ) : array(); // Set classes and styles -$style = "background-color: $bgColor;"; $mediaClass = $mediaLeft ? 'order-first' : 'order-last'; $contentClass = $mediaLeft ? 'order-last pr-8' : 'order-first pl-8'; -$classes = 'media-cols grid grid-cols-1 lg:grid-cols-2 gap-8 items-center mb-8 p-0'; +$classes = 'media-cols grid grid-cols-1 lg:grid-cols-2 gap-24 items-center mb-8 p-0 container'; if ( $isDark ) { $classes .= ' dark text-white'; @@ -42,7 +40,7 @@ if ( $vidBlock && strpos( $vidBlock, ' -
style=""> +
>
@@ -65,7 +63,7 @@ if ( $vidBlock && strpos( $vidBlock, ' -
+