You are here

function advagg_disable in Advanced CSS/JS Aggregation 7.2

Same name and namespace in other branches
  1. 6 advagg.install \advagg_disable()
  2. 7 advagg.install \advagg_disable()

Implements hook_disable().

File

./advagg.install, line 108
Handles Advanced Aggregation installation and upgrade tasks.

Code

function advagg_disable() {

  // Make sure the advagg_get_root_files_dir() function is available.
  drupal_load('module', 'advagg');

  // Make sure the advagg_flush_all_cache_bins() function is available.
  module_load_include('inc', 'advagg', 'advagg');
  module_load_include('inc', 'advagg', 'advagg.cache');

  // Flush caches.
  advagg_flush_all_cache_bins();
  _drupal_flush_css_js();
  drupal_clear_css_cache();
  drupal_clear_js_cache();
  cache_clear_all('*', 'cache_page', TRUE);

  // Make sure the theme_registry: cid is cleared.
  register_shutdown_function('cache_clear_all', 'theme_registry:', 'cache', TRUE);
}