function hook_advagg_bundler_analysis_alter in Advanced CSS/JS Aggregation 7.2
Same name and namespace in other branches
- 8.2 advagg.api.php \hook_advagg_bundler_analysis_alter()
Let other modules modify the analysis array before it is used.
Parameters
array $analysis: An associative array; filename -> data.
See also
Related topics
1 invocation of hook_advagg_bundler_analysis_alter()
- advagg_bundler_analyisis_query in advagg_bundler/
advagg_bundler.module - Run the analysis query and return the analysis array.
File
- ./
advagg.api.php, line 683 - Hooks provided by the AdvAgg module.
Code
function hook_advagg_bundler_analysis_alter(array &$analysis) {
foreach ($analysis as $filename => &$data) {
if ($filename) {
// This is the filename.
}
// This changes often; 604800 is 1 week.
if ($data['changes'] > 10 && $data['mtime'] >= REQUEST_TIME - 604800) {
// Modify the group hash so this doesn't end up in a big aggregate.
$data['group_hash'];
}
}
unset($data);
}