function advagg_admin_flush_stale_files_button in Advanced CSS/JS Aggregation 7.2
Clear out all stale advagg aggregated files.
Related topics
1 string reference to 'advagg_admin_flush_stale_files_button'
- advagg_admin_operations_form in ./
advagg.admin.inc - Form builder; Do advagg operations.
File
- ./
advagg.admin.inc, line 1667 - Admin page callbacks for the advanced CSS/JS aggregation module.
Code
function advagg_admin_flush_stale_files_button() {
// Run the command.
module_load_include('inc', 'advagg', 'advagg.cache');
list($css_files, $js_files) = advagg_delete_stale_aggregates();
// Report back the results.
if (count($css_files) > 0 || count($js_files) > 0) {
drupal_set_message(t('All stale aggregates have been deleted. %css_count CSS files and %js_count JS files have been removed.', array(
'%css_count' => count($css_files),
'%js_count' => count($js_files),
)));
}
else {
drupal_set_message(t('No stale aggregates found. Nothing was deleted.'));
}
}