Remove all files from the advagg CSS/JS directories.
Paramètres
bool $kill_htaccess: Set to TRUE to remove the htaccess files as well.
Return value
array Array of all files removed.
2 calls to advagg_remove_all_aggregated_files()
- advagg_admin_clear_all_files_button dans ./
advagg.admin.inc - Clear out all advagg aggregated files.
- drush_advagg_clear_all_files dans ./
advagg.drush.inc - Callback function for drush advagg-clear-all-files.
Fichier
-
./
advagg.cache.inc, line 383
Code
function advagg_remove_all_aggregated_files($kill_htaccess = FALSE) {
$options = array(
'callback' => 'file_unmanaged_delete',
'nomask' => '/(\\.\\.?|CVS)$/',
);
list($css_files, $js_files) = advagg_get_all_files($options);
// Let other modules know about the removed files.
// Call hook_advagg_removed_aggregates().
module_invoke_all('advagg_removed_aggregates', $css_files);
module_invoke_all('advagg_removed_aggregates', $js_files);
// Remove the htaccess files as well.
if ($kill_htaccess) {
list($css_path, $js_path) = advagg_get_root_files_dir();
if (file_exists($css_path[0] . '/.htaccess')) {
file_unmanaged_delete($css_path[0] . '/.htaccess');
$css_files[] = $css_path[0] . '/.htaccess';
}
if (file_exists($js_path[0] . '/.htaccess')) {
file_unmanaged_delete($js_path[0] . '/.htaccess');
$js_files[] = $js_path[0] . '/.htaccess';
}
}
return array(
$css_files,
$js_files,
);
}