You are here

function advagg_css_alter in Advanced CSS/JS Aggregation 8.3

Same name and namespace in other branches
  1. 8.4 advagg.module \advagg_css_alter()
  2. 8.2 advagg.module \advagg_css_alter()
  3. 7.2 advagg_font/advagg_font.module \advagg_css_alter()

Implements hook_css_alter().

Pass the CSS array to the optimizer service.

File

./advagg.module, line 104
Advanced CSS/JS aggregation module.

Code

function advagg_css_alter(&$css) {

  // Skip if advagg is disabled.
  if (!advagg_enabled()) {
    return;
  }
  $css_optimizer = \Drupal::service('advagg.optimizer.css');
  $css_optimizer
    ->processAssetArray($css);
}