function advagg_css_compress_advagg_get_css_aggregate_contents_alter

cis7 advagg_css_compress.advagg.inc advagg_css_compress_advagg_get_css_aggregate_contents_alter(&$data, $files, $aggregate_settings)
cle7 advagg_css_compress.advagg.inc advagg_css_compress_advagg_get_css_aggregate_contents_alter(&$data, $files, $aggregate_settings)
elmsmedia7 advagg_css_compress.advagg.inc advagg_css_compress_advagg_get_css_aggregate_contents_alter(&$data, $files, $aggregate_settings)
icor7 advagg_css_compress.advagg.inc advagg_css_compress_advagg_get_css_aggregate_contents_alter(&$data, $files, $aggregate_settings)
meedjum_blog7 advagg_css_compress.advagg.inc advagg_css_compress_advagg_get_css_aggregate_contents_alter(&$data, $files, $aggregate_settings)
mooc7 advagg_css_compress.advagg.inc advagg_css_compress_advagg_get_css_aggregate_contents_alter(&$data, $files, $aggregate_settings)

Implements hook_advagg_get_css_aggregate_contents_alter().

File

sites/all/modules/ulmus/advagg/advagg_css_compress/advagg_css_compress.advagg.inc, line 11
Advanced aggregation css compression module.

Code

function advagg_css_compress_advagg_get_css_aggregate_contents_alter(&$data, $files, $aggregate_settings) {
  // Get per file settings.
  foreach ($files as $filename => $settings) {
    if (!empty($aggregate_settings['variables']['advagg_css_compressor_file_settings'])) {
      $form_api_filename = str_replace(array('/', '.'), array('__', '--'), $filename);
      if (isset($aggregate_settings['variables']['advagg_css_compressor_file_settings'][$form_api_filename])) {
        $aggregate_settings['variables']['advagg_css_compressor'] = $aggregate_settings['variables']['advagg_css_compressor_file_settings'][$form_api_filename];
        // If one file can not be compressed then the whole aggregrate can not
        // be compressed.
        if ($aggregate_settings['variables']['advagg_css_compressor'] == 0) {
          break;
        }
      }
    }
  }

  if (empty($aggregate_settings['variables']['advagg_css_compressor'])) {
    return;
  }

  if ($aggregate_settings['variables']['advagg_css_compressor'] == 2) {
    advagg_css_compress_yui_cssmin($data);
  }
}