You are here

function slick_theme in Slick Carousel 7.2

Same name and namespace in other branches
  1. 8.2 slick.module \slick_theme()
  2. 8 slick.module \slick_theme()
  3. 7.3 slick.module \slick_theme()
  4. 7 slick.module \slick_theme()

Implements hook_theme().

File

./slick.module, line 11
Slick carousel integration, the last carousel you'll ever need.

Code

function slick_theme($existing, $type, $theme, $path) {
  $themes = array();
  foreach (array(
    'slick',
    'item',
    'grid',
    'image',
    'wrapper',
  ) as $item) {
    $key = $item == 'slick' ? $item : 'slick_' . $item;
    $functions = in_array($item, array(
      'image',
      'wrapper',
    ));
    $themes[$key] = array(
      'render element' => 'element',
      'file' => 'slick.theme.inc',
      'path' => $path . '/templates',
    );
    if (!$functions) {
      $themes[$key]['template'] = strtr($key, '_', '-');
    }
  }
  return $themes;
}