function javascript_libraries_uninstall in JavaScript Libraries Manager 7
Implements hook_uninstall().
File
- ./
javascript_libraries.install, line 11 - Toggle the inclusion of Drupal system libraries. Upload and reference custom libraries as well.
Code
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');
}