You are here

function media_gallery_library in Media Gallery 7

Same name and namespace in other branches
  1. 7.2 media_gallery.module \media_gallery_library()

Implements hook_library().

File

./media_gallery.module, line 739

Code

function media_gallery_library() {
  $colorbox_path = variable_get('media_gallery_library_path', FALSE);
  if ($colorbox_path === FALSE) {
    $colorbox_path = module_exists('libraries') ? libraries_get_path('colorbox') : 'sites/all/libraries/colorbox';
  }
  else {
    $colorbox_path .= '/colorbox';
  }
  $stylesheet = variable_get('media_gallery_colorbox_stylesheet', 'example1');
  $libraries['colorbox'] = array(
    'title' => 'Colorbox',
    'website' => 'http://colorpowered.com/colorbox/',
    'version' => '1.3.25',
    'js' => array(
      $colorbox_path . '/jquery.colorbox-min.js' => array(),
    ),
    'css' => array(
      $colorbox_path . '/' . $stylesheet . '/colorbox.css' => array(
        'type' => 'file',
        'media' => 'screen',
      ),
    ),
  );
  return $libraries;
}