Jake Vanderwerf
2026-08-30 a58a2e7ca4700d3e23341fde767060a4c2c704a3
inc/managers/IconsManager.php
@@ -487,41 +487,6 @@
      }
   }
   protected function regenerateCSS(array $sourcesToUpdate = []): void
   {
      error_log('[IconsManager]:regenerateCSS');
      $css_dir = JVB_CHILD_DIR.'/assets/css/';
      if (!file_exists($css_dir)) {
         wp_mkdir_p($css_dir);
      }
      // If no specific sources provided, regenerate all
      if (empty($sourcesToUpdate)) {
         $sourcesToUpdate = array_fill_keys(array_keys(self::$instances), true);
      }
      // Generate CSS only for sources that need it
      foreach (self::$instances as $source => $instance) {
         if (!isset($sourcesToUpdate[$source])) {
            continue; // Skip this source
         }
         $css = $instance->generateIconCSS();
         $css_path = $css_dir . $source . '.css';
         // Archive current version before overwriting
         $instance->archiveCurrentVersion($css);
         if (file_put_contents($css_path, $css) !== false) {
            Cache::for('icons_'.$source)->flush();
            error_log("[IconsManager] Updated {$source}.css");
         } else {
            error_log("[IconsManager] Could not write {$source}.css");
         }
      }
   }
   /**
    * Prevent cloning
    */
@@ -529,6 +494,7 @@
   /**
    * Prevent unserialization
    * @throws Exception
    */
   public function __wakeup()
   {