You are here

function hook_javascript_libraries_available_alter in JavaScript Libraries Manager 7

Implements hook_javascript_libraries_available_alter().

This alter hook allows a module to add or remove JS libraries that will be exposed to the end user, as well as changing the grouping of them in the UI.

Related topics

1 invocation of hook_javascript_libraries_available_alter()
javascript_libraries_default_form in ./javascript_libraries.admin.inc
Form builder function for page callback.

File

./javascript_libraries.api.php, line 21
API documentation for JavaScript Libraries Manager module.

Code

function hook_javascript_libraries_available_alter(&$groups) {

  // Don't show jQuery UI Tabs as an option.
  $idx = array_search('ui.tabs', $groups['jQuery UI']['library']);
  if ($idx !== FALSE) {
    unset($groups['jQuery UI']['library'][$idx]);
  }
}