You are here

function advagg_css_array_fixer in Advanced CSS/JS Aggregation 6

Same name and namespace in other branches
  1. 7 advagg.module \advagg_css_array_fixer()

Remove .less files from the array.

Parameters

$css_func: Drupal CSS array.

1 call to advagg_css_array_fixer()
advagg_processor in ./advagg.module
Process variables for page.tpl.php

File

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

Code

function advagg_css_array_fixer(&$css_func) {
  if (!module_exists('less')) {
    return;
  }

  // Remove '.css.less' files from the stack.
  foreach ($css_func as $k => $v) {
    foreach ($v as $ke => $va) {
      foreach ($va as $file => $preprocess) {
        if (substr($file, -5) === '.less') {
          unset($css_func[$k][$ke][$file]);
        }
      }
    }
  }
}