You are here

function advagg_merge_css in Advanced CSS/JS Aggregation 6

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

Merge 2 css arrays together.

Parameters

$array1: first array

$array2: second array

Return value

combined array

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

File

./advagg.module, line 487
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;
}