function hook_advagg_get_js_aggregate_contents_alter in Advanced CSS/JS Aggregation 7.2
Allow other modules to modify this aggregates contents.
Parameters
string $data: Raw JS data.
array $files: List of files used to create this aggregate.
array $aggregate_settings: An associative array of hooks and settings used.
See also
advagg_get_js_aggregate_contents()
advagg_js_compress_advagg_get_js_aggregate_contents_alter()
Related topics
1 invocation of hook_advagg_get_js_aggregate_contents_alter()
- advagg_get_js_aggregate_contents in ./
advagg.missing.inc - Given a list of files, grab their contents and glue it into one big string.
File
- ./
advagg.api.php, line 229 - Hooks provided by the AdvAgg module.
Code
function hook_advagg_get_js_aggregate_contents_alter(&$data, array $files, array $aggregate_settings) {
// Do nothing if js file compression is disabled.
if (empty($aggregate_settings['variables']['advagg_js_compressor'])) {
return;
}
// Compress it.
$filename = drupal_hash_base64(serialize($files));
advagg_js_compress_prep($data, $filename, $aggregate_settings, FALSE);
}