Last active
November 11, 2020 01:15
-
-
Save robdecker/11454138 to your computer and use it in GitHub Desktop.
[Remove core css] https://github.com/Krimson/wundertheme/blob/master/template.php #d7
This file contains hidden or 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
/** | |
* Implements hook_css_alter(). | |
*/ | |
function MY_THEME_css_alter(&$css) { | |
/* Remove some default Drupal css */ | |
$exclude = array( | |
'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/field/theme/field.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.maintenance.css' => FALSE, | |
'modules/system/system.messages.css' => FALSE, | |
'modules/system/system.theme.css' => FALSE, | |
'modules/system/system.menus.css' => FALSE, | |
'modules/taxonomy/taxonomy.css' => FALSE, | |
'modules/tracker/tracker.css' => FALSE, | |
'modules/update/update.css' => FALSE, | |
'modules/user/user.css' => FALSE, | |
// Remove contrib module CSS | |
drupal_get_path('module', 'views') . '/css/views.css' => FALSE, | |
); | |
$css = array_diff_key($css, $exclude); | |
/* Get rid of some default panel css */ | |
foreach ($css as $path => $meta) { | |
if (strpos($path, 'threecol_33_34_33_stacked') !== FALSE || strpos($path, 'threecol_25_50_25_stacked') !== FALSE) { | |
unset($css[$path]); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment