You are here

function advagg_merge_css in Advanced CSS/JS Aggregation 7

Same name and namespace in other branches
  1. 6 advagg.module \advagg_merge_css()

Merge 2 css arrays together.

Parameters

$array1: first array

$array2: second array

Return value

combined array

File

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

Code

function advagg_merge_css($array1, $array2) {
  if (!empty($array2)) {
    foreach ($array2 as $media => $types) {
      foreach ($types as $type => $files) {
        foreach ($files as $file => $preprocess) {
          $array1[$media][$type][$file] = $preprocess;
        }
      }
    }
  }
  return $array1;
}