colorbox.module 1.33 KB
Newer Older
jdwfly's avatar
jdwfly committed
1
<?php
2

jdwfly's avatar
jdwfly committed
3 4 5 6
/**
 * @file
 * A light-weight, customizable lightbox plugin for jQuery 1.3
 */
7 8 9 10

/**
 * The default path to the Colorbox directory.
 */
11
define('COLORBOX_MIN_PLUGIN_VERSION', '1.6.1');
12 13 14


/**
15
 * Implements hook_theme().
16 17
 */
function colorbox_theme() {
18
  return array(
19
    'colorbox_formatter' => array(
20 21
      'variables' => array(
        'item' => NULL,
22
        'entity' => NULL,
grisendo's avatar
grisendo committed
23
        'settings' => NULL,
24
      ),
25
      'file' => 'colorbox.theme.inc',
26 27
    ),
  );
28 29
}

30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67
/**
 * Implements hook_libraries_info().
 */
function colorbox_libraries_info() {
  $libraries['colorbox'] = array(
    'name' => 'Colorbox plugin',
    'vendor url' => 'http://www.jacklmoore.com/colorbox',
    'download url' => 'https://github.com/jackmoore/colorbox/archive/1.x.zip',
    'version arguments' => array(
      'file' => 'jquery.colorbox-min.js',
      'pattern' => '@(?i:Colorbox)\sv?([0-9\.a-z]+)@',
      'lines' => 5,
    ),
    'files' => array(
      'js' => array(
        'jquery.colorbox-min.js',
      ),
    ),
    'variants' => array(
      'minified' => array(
        'files' => array(
          'js' => array(
            'jquery.colorbox-min.js',
          ),
        ),
      ),
      'source' => array(
        'files' => array(
          'js' => array(
            'jquery.colorbox.js',
          ),
        ),
      ),
    ),
  );

  return $libraries;
}