You are here

function slick_devel_library_alter in Slick extras 7.2

Same name and namespace in other branches
  1. 7.3 slick_devel/slick_devel.module \slick_devel_library_alter()

Implements hook_library_alter().

File

slick_devel/slick_devel.module, line 35
Provides development options for the Slick module.

Code

function slick_devel_library_alter(&$libraries, $module) {
  $path = drupal_get_path('module', 'slick_devel');
  $slick_path = drupal_get_path('module', 'slick');
  if ($module != 'slick') {
    return;
  }
  if (SLICK_DEVEL) {

    // Switch to the un-minified version of the library.
    if (isset($libraries['slick'])) {
      $libraries['slick']['js'] = array(
        libraries_get_path('slick') . '/slick/slick.js' => array(
          'group' => JS_LIBRARY,
          'weight' => -4,
        ),
      );
    }
  }
}