All pastes #808043 Raw Edit

Someone

public text v1 · immutable
·published 2007-12-07 06:10 UTC
rendered paste body
     $pathed_stylesheets = array();
     foreach ($themes[$key]->info['stylesheets'] as $media => $stylesheets) {
       foreach ($stylesheets as $stylesheet) {
-        $pathed_stylesheets[$media][$stylesheet] = dirname($themes[$key]->filename) .'/'. $stylesheet;
+        if ($stylesheet == '*.css') {
+          $wildcards = file_scan_directory('sites/all/themes/'.$themes[$key]->name, '\.css$');
+          foreach ($wildcards as $wildcard) {
+            $pathed_stylesheets[$media][$wildcard->name] = $wildcard->filename;
+          }  
+        } else {
+          $pathed_stylesheets[$media][$stylesheet] = dirname($themes[$key]->filename) .'/'. $stylesheet;
+        }
       }
     }