From ac444cba221832c012c0435fdc8339fe9f37febb Mon Sep 17 00:00:00 2001
From: Jake Vanderwerf <get@jakevanderwerf.ca>
Date: Mon, 11 May 2026 18:35:04 +0000
Subject: [PATCH] =Some changes to the CRUD.js editing, timeline post configuration

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

diff --git a/inc/utility/Image.php b/inc/utility/Image.php
index df5c2f3..83b95e7 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');
 

--
Gitblit v1.10.0