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/utility/Image.php | 15 ++++++++++++++-
1 files changed, 14 insertions(+), 1 deletions(-)
diff --git a/inc/utility/Image.php b/inc/utility/Image.php
index 0626891..384a699 100644
--- a/inc/utility/Image.php
+++ b/inc/utility/Image.php
@@ -185,5 +185,18 @@
{
return (new Image)->formatImage($id, $start, $replace, $addLink, $postSlug);
}
-
+ public static function SVG(string $slug):string
+ {
+ $cache = Cache::for('svgs');
+ if (JVB_TESTING) {
+ $cache->flush();
+ }
+ return $cache->remember(
+ $slug,
+ function() use ($slug) {
+ $filename = JVB_CHILD_DIR.'/assets/icons/'.$slug.'.svg';
+ return file_exists($filename) ? file_get_contents($filename) : '';
+ }
+ );
+ }
}
--
Gitblit v1.10.0