function select2_all_library_info_alter in Select2 ALL THE THINGS! 8
Implements hook_library_info_alter().
File
- ./
select2_all.module, line 45 - Hooks for the Select2 All module.
Code
function select2_all_library_info_alter(array &$libraries, $extension) {
if ($extension === 'select2_all' && is_dir(DRUPAL_ROOT . '/libraries/select2/dist')) {
unset($libraries['select2']['js']);
unset($libraries['select2']['css']);
unset($libraries['select2']['version']);
$libraries['select2']['js']['/libraries/select2/dist/js/select2.min.js'] = [
'minified' => TRUE,
];
$libraries['select2']['css']['component']['/libraries/select2/dist/css/select2.min.css'] = [
'minified' => TRUE,
];
}
}