Same name in other branches
  1. 5.0.x advagg_mod/advagg_mod.module \advagg_mod_css_alter()
  2. 6.0.x advagg_mod/advagg_mod.module \advagg_mod_css_alter()
  3. 7.x-2.x advagg_mod/advagg_mod.module \advagg_mod_css_alter()
  4. 8.x-2.x advagg_mod/advagg_mod.module \advagg_mod_css_alter()
  5. 8.x-4.x advagg_mod/advagg_mod.module \advagg_mod_css_alter()

Implements hook_css_alter().

Fichier

advagg_mod/advagg_mod.module, line 69

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);
    }
}