Same name in other branches
  1. 7.x-2.x advagg.install \advagg_enable()

Implements hook_enable().

File

./advagg.install, line 11

Code

function advagg_enable() {
    // Create the advagg_css/ path within the files folder.
    $css_path = 'public://advagg_css';
    file_prepare_directory($css_path, FILE_CREATE_DIRECTORY);
    $js_path = 'public://advagg_js';
    // Create the advagg_js/ path within the files folder.
    file_prepare_directory($js_path, 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);
    }
}