From ba1e1ccf869b818f7a7a897264dfea05563a7796 Mon Sep 17 00:00:00 2001
From: Jake Vanderwerf <get@jakevanderwerf.ca>
Date: Sun, 07 Jun 2026 20:10:20 +0000
Subject: [PATCH] =Major overhaul of Integrations. Playing around with adding fields to post types through Registrar from an integrations' class file.

---
 inc/helpers/media.php |   24 ++++++++++++++++--------
 1 files changed, 16 insertions(+), 8 deletions(-)

diff --git a/inc/helpers/media.php b/inc/helpers/media.php
index 9c30bab..6edb4f2 100644
--- a/inc/helpers/media.php
+++ b/inc/helpers/media.php
@@ -4,21 +4,21 @@
 	exit;
 }
 
-function jvbRenderGallery()
+function jvbRenderGallery(bool $output = true):string
 {
-    ?>
-    <dialog class="gallery" aria-modal="true" aria-label="Image Gallery">
+	$gallery = sprintf(
+		'<dialog class="gallery" aria-modal="true" aria-label="Image Gallery">
 
 		<div class="wrap col">
 			<p class="hint">Pinch to Zoom</p>
 			<div class="controls row">
-				<button type="button" class="cancel" title="Close Gallery" aria-label="Close Gallery"> <?= jvbIcon('x') ?></button>
+				<button type="button" class="cancel" title="Close Gallery" aria-label="Close Gallery">%s</button>
 				<button class="nav prev" title="Previous image" aria-label="Previous image">
-					<?= jvbIcon('caret-left') ?>
+					%s
 				</button>
 
 				<button class="nav next" title="Next Image" aria-label="Next image">
-					<?= jvbIcon('caret-right') ?>
+					%s
 				</button>
 			</div>
 			<div class="content row">
@@ -34,7 +34,15 @@
 			<div class="favourite"></div>
 			<div class="counter"><span id="gallery-index">1</span> / <span class="total"></span></div>
 		</div>
-    </dialog>
-    <?php
+    </dialog>',
+		jvbIcon('x'),
+		jvbIcon('caret-left'),
+		jvbIcon('caret-right')
+	);
+
+	if ($output) {
+		echo $gallery;
+	}
+	return $gallery;
 }
 

--
Gitblit v1.10.0