You are here

function advagg_enable in Advanced CSS/JS Aggregation 6

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

Implementation of hook_enable().

File

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

Code

function advagg_enable() {

  // Create the advagg_css/ path within the files folder.
  $csspath = file_create_path('advagg_css');
  file_check_directory($csspath, FILE_CREATE_DIRECTORY);

  // Create the advagg_js/ path within the files folder.
  $jspath = file_create_path('advagg_js');
  file_check_directory($jspath, FILE_CREATE_DIRECTORY);

  // Include the module file.
  register_shutdown_function('drupal_load', 'module', 'advagg');

  // Rescan files.
  register_shutdown_function('advagg_flush_caches');

  // Check for fast404.
  register_shutdown_function('advagg_check_missing_handler');
  if (module_exists('javascript_aggregator')) {
    variable_set('advagg_closure', FALSE);
  }
}