From f859e64a57c624ff2daa2b21355f65a49fd4807d Mon Sep 17 00:00:00 2001
From: Jake Vanderwerf <get@jakevanderwerf.ca>
Date: Sat, 29 Aug 2026 03:09:12 +0000
Subject: [PATCH] =Some more tweaks. Mostly on the MenuBlock and adding the Meta.php to WooCommerce Products

---
 inc/managers/IconsManager.php |   39 ++++++++++++++++++++++++---------------
 1 files changed, 24 insertions(+), 15 deletions(-)

diff --git a/inc/managers/IconsManager.php b/inc/managers/IconsManager.php
index 7c7d995..bc56566 100644
--- a/inc/managers/IconsManager.php
+++ b/inc/managers/IconsManager.php
@@ -698,27 +698,36 @@
 		foreach ($this->icons as $style => $names) {
 			$styleClass = ($style !== $this->style) ? '-'.substr($style, 0, 2) : '';
 			foreach ($names as $icon) {
-				$svg = $this->getEncodedSVG($icon, $style);
-				if ($svg !== '') {
-					if ($icon === 'caret-down') {
-						$css .= 'details summary::after,';
-					} elseif ($icon === 'faders-horizontal') {
-						$css .= 'details.all-filters summary::after,';
-					} elseif ($icon === 'link') {
-						$css .= 'input[type=url],';
-					} elseif ($icon === apply_filters('jvbSeparatorLogo', 'logo')) {
-						$css .= 'hr.logo::before,';
-					}
-					$css .= ".icon-{$icon}{$styleClass}{";
-					$css .= "--icon:url('data:image/svg+xml;base64,{$svg}');";
-					$css .= "}";
-				}
+				$css .= $this->generateSingleIconCss($icon, $style, $styleClass);
 			}
 		}
 		update_option($this->timestampKey, time());
 		return $this->minifyCss($css);
 	}
 
+	public function generateSingleIconCss(string $icon, ?string $style = null, ?string $styleClass = null):string
+	{
+		$style = $style??$this->style;
+		$styleClass = $styleClass??($style !== $this->style) ? '-'.substr($style, 0, 2) : '';
+		$css = '';
+		$svg = $this->getEncodedSVG($icon, $style);
+		if ($svg !== '') {
+			if ($icon === 'caret-down') {
+				$css .= 'details summary::after,';
+			} elseif ($icon === 'faders-horizontal') {
+				$css .= 'details.all-filters summary::after,';
+			} elseif ($icon === 'link') {
+				$css .= 'input[type=url],';
+			} elseif ($icon === apply_filters('jvbSeparatorLogo', 'logo')) {
+				$css .= 'hr.logo::before,';
+			}
+			$css .= ".icon-{$icon}{$styleClass}{";
+			$css .= "--icon:url('data:image/svg+xml;base64,{$svg}');";
+			$css .= "}";
+		}
+		return $css;
+	}
+
 	protected function minifyCSS(string $css): string
 	{
 		// Remove comments

--
Gitblit v1.10.0