function advagg_uninstall in Advanced CSS/JS Aggregation 7.2
Same name and namespace in other branches
- 8.4 advagg.install \advagg_uninstall()
- 8.2 advagg.install \advagg_uninstall()
- 8.3 advagg.install \advagg_uninstall()
- 6 advagg.install \advagg_uninstall()
- 7 advagg.install \advagg_uninstall()
Implements hook_uninstall().
File
- ./
advagg.install, line 130 - Handles Advanced Aggregation installation and upgrade tasks.
Code
function advagg_uninstall() {
// Make sure the advagg_get_root_files_dir() function is available.
drupal_load('module', 'advagg');
list($css_path, $js_path) = advagg_get_root_files_dir();
// Make sure the advagg_flush_all_cache_bins() function is available.
module_load_include('inc', 'advagg', 'advagg.cache');
// Flush caches.
advagg_flush_all_cache_bins();
// Remove variables.
db_delete('variable')
->condition('name', 'advagg%', 'LIKE')
->execute();
// Remove all files and directories.
file_unmanaged_delete_recursive($css_path[0]);
file_unmanaged_delete_recursive($js_path[0]);
// Make sure the theme_registry: cid is cleared.
register_shutdown_function('cache_clear_all', 'theme_registry:', 'cache', TRUE);
}