| | |
| | | 'apple-logo', |
| | | 'check-circle', |
| | | 'close-circle', |
| | | 'faders-horizontal', |
| | | 'cloud-slash', |
| | | 'exclamation-mark', |
| | | 'cloud-arrow-down', |
| | |
| | | // ] |
| | | ]; |
| | | |
| | | |
| | | // Add icons from content/taxonomy/user configs (like old behavior) |
| | | $configIcons = $this->getIconsFromConfigs(); |
| | | if (!empty($configIcons)) { |
| | |
| | | if (isset($allIcons[$this->source])) { |
| | | $icons = array_merge($icons, $allIcons[$this->source]); |
| | | } |
| | | |
| | | if (!empty($icons)) { |
| | | $this->include($icons); |
| | | } |
| | |
| | | protected function registerGlobalHooks(): void |
| | | { |
| | | add_action('wp_loaded', [self::class, 'checkCSS']); |
| | | add_action('shutdown', [self::class, 'checkCSS']); |
| | | } |
| | | |
| | | /** |
| | |
| | | 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],'; |
| | | } |
| | | $css .= ".icon-{$icon}{$styleClass}{"; |
| | | $css .= "--icon:url('data:image/svg+xml;base64,{$svg}');"; |
| | | $css .= "}"; |