From 46d681c6b825d21b3f698d793c4e630c687d90ad Mon Sep 17 00:00:00 2001
From: Jake Vanderwerf <get@jakevanderwerf.ca>
Date: Thu, 21 May 2026 21:41:53 +0000
Subject: [PATCH] =Major CustomBlocks.php overhaul, expanding block support and customization from the editor. theme.json should now be updated on new themes to set brand colours, etc. Also note: major change to .col vs .row alignment: simplifying it to .top .bottom vs the confusion of the differences for .col/.row .start and .a-start

---
 inc/utility/Image.php |   19 +++++++++++++++++--
 1 files changed, 17 insertions(+), 2 deletions(-)

diff --git a/inc/utility/Image.php b/inc/utility/Image.php
index df5c2f3..0b0afc2 100644
--- a/inc/utility/Image.php
+++ b/inc/utility/Image.php
@@ -72,8 +72,17 @@
 
 		if ($addLink) {
 			if (!$postSlug) {
-				global $post;
-				$postSlug = $post->post_name;
+				if (is_singular()) {
+					global $post;
+					$postSlug = $post->post_name;
+				}else if (is_tax()) {
+					$tax = get_queried_object();
+					$postSlug = jvbNoBase($tax->taxonomy);
+				}elseif (is_post_type_archive()) {
+					$obj = get_queried_object();
+					$postSlug = jvbNoBase($obj->post_type);
+				}
+
 			}
 			$full = wp_get_attachment_image_src($ID, 'full');
 
@@ -144,4 +153,10 @@
 			}
 		);
 	}
+
+	public static function getData(int $imgID):array
+	{
+		return (new Image)->getImageData($imgID);
+	}
+
 }

--
Gitblit v1.10.0