You are here

function jcarousel_skins in jCarousel 8.3

Same name and namespace in other branches
  1. 6.2 jcarousel.module \jcarousel_skins()
  2. 7.3 jcarousel.module \jcarousel_skins()
  3. 7.2 jcarousel.module \jcarousel_skins()

Retrieves a list of all available Carousel skins.

3 calls to jcarousel_skins()
jcarousel_add in ./jcarousel.module
Adds all the necessary CSS and JS necessary for building a carousel.
jcarousel_help in ./jcarousel.module
Implements hook_help().
jcarousel_style_plugin::options_form in includes/jcarousel_style_plugin.inc

File

./jcarousel.module, line 285
Provides integration with 3rd party modules and the jCarousel library.

Code

function jcarousel_skins() {
  static $skins;

  // Don't rebuild if we already have a list of skins.
  if (isset($skins)) {
    return $skins;
  }

  // Build a list of skins from other modules.
  $skins = array();
  foreach (module_implements('jcarousel_skin_info') as $module) {
    $function = $module . '_jcarousel_skin_info';
    $module_skins = $function();
    foreach ($module_skins as $key => $skin) {
      $skin['module'] = $module;
      $skin['file path'] = isset($skin['file path']) ? $skin['file path'] : drupal_get_path('module', $module);
      $skin['title'] = isset($skin['title']) ? $skin['title'] : $key;
      $skins[$key] = $skin;
    }
  }
  ksort($skins);
  return $skins;
}