Skip to content

Instantly share code, notes, and snippets.

@hkirsman
Created June 22, 2012 12:08
Show Gist options
  • Save hkirsman/2972369 to your computer and use it in GitHub Desktop.
Save hkirsman/2972369 to your computer and use it in GitHub Desktop.
Drupal theme modifications through template.php (remove and reorder css files for now)
<?php
/**
* Hook hook_css_alter().
*/
function THEME_NAME_css_alter(&$css) {
// reset is the first loaded css
$css['sites/all/themes/omega/alpha/css/alpha-reset.css']['group'] = -9999;
// list of css files to be excluded from display
$exclude = array(
/*
'misc/vertical-tabs.css' => FALSE,
'modules/aggregator/aggregator.css' => FALSE,
'modules/block/block.css' => FALSE,
'modules/book/book.css' => FALSE,
'modules/comment/comment.css' => FALSE,
'modules/dblog/dblog.css' => FALSE,
'modules/file/file.css' => FALSE,
'modules/filter/filter.css' => FALSE,
'modules/forum/forum.css' => FALSE,
'modules/help/help.css' => FALSE,
'modules/menu/menu.css' => FALSE,
'modules/node/node.css' => FALSE,
'modules/openid/openid.css' => FALSE,
'modules/poll/poll.css' => FALSE,
'modules/profile/profile.css' => FALSE,
'modules/search/search.css' => FALSE,
'modules/statistics/statistics.css' => FALSE,
'modules/syslog/syslog.css' => FALSE,
'modules/system/admin.css' => FALSE,
'modules/system/maintenance.css' => FALSE,
'modules/system/system.css' => FALSE,
'modules/system/system.admin.css' => FALSE,
'modules/system/system.base.css' => FALSE,
'modules/system/system.maintenance.css' => FALSE,
'modules/system/system.menus.css' => FALSE,
'modules/system/system.messages.css' => FALSE,
'modules/system/system.theme.css' => FALSE,
'modules/taxonomy/taxonomy.css' => FALSE,
'modules/tracker/tracker.css' => FALSE,
'modules/update/update.css' => FALSE,
'modules/user/user.css' => FALSE,*/
'sites/all/modules/field_group/horizontal-tabs/horizontal-tabs.css' => FALSE,
'sites/all/themes/omega/omega/css/formalize.css' => FALSE, // form css
'sites/all/themes/omega/omega/css/omega-visuals.css' => FALSE, // pager, table hover and paddings
);
$css = array_diff_key($css, $exclude);
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment