Created
January 15, 2012 17:14
-
-
Save egil/1616481 to your computer and use it in GitHub Desktop.
Drupal: Removes all stylesheets except those added by the theme. Should be added to your template.php file. More info can be found here: http://api.drupal.org/api/drupal/modules--system--system.api.php/function/hook_css_alter/7
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function THEME_css_alter(&$css) { | |
foreach ($css as $key => $value) { | |
if ($value['group'] != CSS_THEME) { | |
$exclude[$key] = FALSE; | |
} | |
} | |
$css = array_diff_key($css, $exclude); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment