function advagg_mod_css_alter in Advanced CSS/JS Aggregation 8.3
Same name and namespace in other branches
- 8.4 advagg_mod/advagg_mod.module \advagg_mod_css_alter()
- 8.2 advagg_mod/advagg_mod.module \advagg_mod_css_alter()
- 7.2 advagg_mod/advagg_mod.module \advagg_mod_css_alter()
Implements hook_css_alter().
File
- advagg_mod/
advagg_mod.module, line 69 - Advanced aggregation modifier module.
Code
function advagg_mod_css_alter(&$css) {
if (!advagg_enabled()) {
return;
}
$config = \Drupal::config('advagg_mod.settings');
if ($config
->get('css_adjust_sort_external') || $config
->get('css_adjust_sort_browsers')) {
advagg_mod_sort_css_js($css, 'css');
}
// Force all CSS to be preprocessed.
if ($config
->get('css_preprocess')) {
foreach ($css as &$values) {
$values['preprocess'] = TRUE;
}
unset($values);
}
}