Опубликовано пользователем dm
Drupal 6
-
function mytheme_preprocess_page(&$vars){
-
$css = $vars['css'];
-
//core modules
-
unset($css['all']['module']['modules/node/node.css']);
-
//contrib
-
unset($css['all']['module']['sites/all/modules/contrib/filefield/filefield.css']);
-
//custom
-
unset($css['all']['module']['sites/all/modules/custom/mymodule/mymodule.css']);
-
//theme css
-
unset($css['all']['theme']['sites/all/themes/mytheme/mytheme.css']);
-
-
$vars['styles'] = drupal_get_css($css);
-
}
Drupal 7
-
function mymodule_css_alter(&$css) {
-
$exclude = array(
-
//core
-
'modules/system/maintenance.css' => FALSE,
-
//contrib
-
'sites/all/modules/contrib/module/module.css' => FALSE,
-
//custom
-
'sites/all/modules/custom/module/module.css' => FALSE,
-
//theme
-
'sites/all/themes/mytheme/mytheme.css' => FALSE,
-
);
-
$css = array_diff_key($css, $exclude);
-
}