From 07282da9671de8fb2601e9e641decb2655439ad8 Mon Sep 17 00:00:00 2001
From: Jake Vanderwerf <get@jakevanderwerf.ca>
Date: Thu, 01 Jan 2026 23:20:54 +0000
Subject: [PATCH] =FeedRoutes.php: fixed the extractTaxonomies method

---
 inc/blocks/VideoCoverBlock.php |   34 ++++++++++++++++++++++++++++------
 1 files changed, 28 insertions(+), 6 deletions(-)

diff --git a/inc/blocks/VideoCoverBlock.php b/inc/blocks/VideoCoverBlock.php
index c0b18a6..298ee76 100644
--- a/inc/blocks/VideoCoverBlock.php
+++ b/inc/blocks/VideoCoverBlock.php
@@ -1,6 +1,7 @@
 <?php
 namespace JVBase\blocks;
 
+use JVBase\blocks\CustomBlocks;
 if (!defined('ABSPATH')) {
 	exit;
 }
@@ -41,6 +42,7 @@
 	 */
 	public function render($attributes, $content): string
 	{
+
 		// Extract attributes with defaults
 		$poster_id = $attributes['posterId'] ?? 0;
 		$video_sources = $attributes['videoSources'] ?? [];
@@ -55,7 +57,8 @@
 		$date = date('c',strtotime($post->post_date));
 		$title = $attributes['title'] ?? $post->post_title;
 		$description = $attributes['description'] ?? $post->post_excerpt;
-
+		$title = "Legacy Tattoo Removal";
+		$description="A video of Madi Rawson performing laser tattoo removal treatments.";
 		// If no video sources, return empty
 		if (empty($video_sources)) {
 			return '';
@@ -81,7 +84,7 @@
             "uploadDate": "'.$date.'"
         }
     </script>
-    <div class="wrap">
+    <div class="wrap abs edges">
         <div class="video-container">';
 		$html .= '<video';
 		$html .= ' muted loop playsinline autoplay';
@@ -90,13 +93,13 @@
 			$html .= ' poster="' . esc_url($poster_url) . '"';
 		}
 
-		$html .= '>';
+		$html .= ' fetch-priority="high">';
 
 		// Add mobile sources first (lower resolution)
 		foreach ($mobile_sources as $source) {
 			if (!empty($source['url']) && !empty($source['mime'])) {
 				$html .= '<source';
-				$html .= ' src="' . esc_url($source['url']) . '"';
+				$html .= ' data-src="' . esc_url($source['url']) . '"';
 				$html .= ' type="' . esc_attr($source['mime']) . '"';
 				$html .= ' media="(max-width: 767px)"';
 				$html .= '>';
@@ -107,7 +110,7 @@
 		foreach ($video_sources as $source) {
 			if (!empty($source['url']) && !empty($source['mime'])) {
 				$html .= '<source';
-				$html .= ' src="' . esc_url($source['url']) . '"';
+				$html .= ' data-src="' . esc_url($source['url']) . '"';
 				$html .= ' type="' . esc_attr($source['mime']) . '"';
 
 				// Add media query for desktop if mobile sources exist
@@ -120,8 +123,27 @@
 		}
 
 		$html .= '</video>';
-		$html .= '</div></div><div class="inner-wrap"></div></section>';
+
+		$inner_content = $this->extractInnerContent($content);
+		$html .= '</div></div><div class="inner-wrap">'.$inner_content.'</div></section>';
 
 		return $html;
 	}
+
+	/**
+	 * Extract inner content from the saved block content
+	 * Removes the wrapper div and returns just the inner blocks HTML
+	 */
+	protected function extractInnerContent(string $content): string
+	{
+		if (empty($content)) {
+			return '';
+		}
+
+		// Remove the placeholder wrapper div
+		$content = preg_replace('/<div[^>]*class="[^"]*video-cover-wrapper-placeholder[^"]*"[^>]*>/', '', $content, 1);
+		$content = preg_replace('/<\/div>\s*$/', '', $content, 1);
+
+		return trim($content);
+	}
 }

--
Gitblit v1.10.0