forked from mattbanks/Drupal-7-Starter-Theme
-
Notifications
You must be signed in to change notification settings - Fork 0
/
template.php
28 lines (21 loc) · 635 Bytes
/
template.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<?php
/**
* Implements hook_css_alter().
* Forces style.css to be included with <link> tag instead of drupals default @import
* - because browserSync doesn't support @import.
* Code from: https://www.drupal.org/project/link_css
*/
function gulp_boilerplate_css_alter(&$css) {
$count = 0;
foreach ($css as $key => $value) {
// Skip core files.
$is_core = (strpos($value['data'], 'misc/') === 0 || strpos($value['data'], 'modules/') === 0);
if (!$is_core) {
// This option forces embeding with a link element.
$css[$key]['preprocess'] = FALSE;
$count++;
}
}
}
// Add functions here
?>