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

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