From 48721c85ebcfa973ee81719d2467ca80e4253dc9 Mon Sep 17 00:00:00 2001
From: Jake Vanderwerf <get@jakevanderwerf.ca>
Date: Fri, 01 May 2026 17:30:03 +0000
Subject: [PATCH] =Edmonton Ink hard test begins! Real testing of the managers and reset routes will commence. So far, just ensuring our classes are all loaded correctly: Site() and its sub-classes Membership, Login, etc. Care should be taken to load conditionally on 'init', as we finish defining most settings by 'plugins_loaded' at priority 5
---
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