You are here

javascript_libraries.install in JavaScript Libraries Manager 7

Toggle the inclusion of Drupal system libraries. Upload and reference custom libraries as well.

File

javascript_libraries.install
View source
<?php

/**
 * @file
 * Toggle the inclusion of Drupal system libraries. Upload and reference custom libraries as well.
 */

/**
 * Implements hook_uninstall().
 */
function javascript_libraries_uninstall() {

  // Delete all variables used by this module.
  variable_del('javascript_libraries_drupal_libraries');
  $custom = variable_get('javascript_libraries_custom_libraries', array());
  foreach ($custom as $library) {
    if ($library['type'] == 'file') {

      // Delete associated file.
      $old_file = file_load($library['fid']);
      file_delete($old_file);
    }
  }
  variable_del('javascript_libraries_custom_libraries');
  variable_del('javascript_libraries_custom_weight_offset');
  variable_del('javascript_libraries_block_settings');
}

Functions