You are here

function slick_library in Slick Carousel 7

Same name and namespace in other branches
  1. 7.3 slick.module \slick_library()
  2. 7.2 slick.module \slick_library()

Implements hook_library().

File

./slick.module, line 275
Slick carousel for Drupal.

Code

function slick_library() {
  $slick_library_path = slick_get_slick_path();
  $slick_module_path = drupal_get_path('module', 'slick');
  $libraries = array();

  // Slick plugin.
  $libraries['slick'] = array(
    'title' => 'Slick',
    'website' => 'http://kenwheeler.github.io/slick/',
    'version' => '1.3.2',
    'js' => array(
      $slick_library_path . '/slick/slick.min.js' => array(
        'group' => JS_DEFAULT,
      ),
    ),
    'css' => array(
      $slick_library_path . '/slick/slick.css' => array(
        'group' => CSS_DEFAULT,
      ),
    ),
  );

  // Slick module.
  $libraries['drupal.slick'] = array(
    'title' => 'Slick',
    'version' => '1.0',
    'js' => array(
      $slick_module_path . '/js/slick.js' => array(),
    ),
    'css' => array(
      $slick_module_path . '/css/slick.css' => array(
        'type' => 'file',
        'media' => 'screen',
      ),
    ),
    'dependencies' => array(
      array(
        'system',
        'jquery.once',
      ),
      array(
        'slick',
        'slick',
      ),
    ),
  );
  return $libraries;
}