You are here

function _views_slideshow_jcarousel_library_path in Views Slideshow JCarousel 7.2

Same name and namespace in other branches
  1. 6 views_slideshow_jcarousel.module \_views_slideshow_jcarousel_library_path()
  2. 7 views_slideshow_jcarousel.module \_views_slideshow_jcarousel_library_path()

Gets the path to the jCarousel library.

Return value

The path to the jCarousel library js file, or FALSE if not found.

3 calls to _views_slideshow_jcarousel_library_path()
views_slideshow_jcarousel_pager_views_slideshow_widget_pager_form_options in ./views_slideshow_jcarousel.module
_views_slideshow_jcarousel_preprocess_pager in theme/views_slideshow_jcarousel.theme.inc
Theme pager fields
_views_slideshow_jcarousel_preprocess_views_slideshow_jcarousel_main_frame in theme/views_slideshow_jcarousel.theme.inc
@file Theme functions for Views Slideshow JCarousel

File

./views_slideshow_jcarousel.module, line 94

Code

function _views_slideshow_jcarousel_library_path() {
  $lib = libraries_load(JCAROUSEL_LIBRARY_NAME);
  $jcarousel_path = libraries_get_path(JCAROUSEL_LIBRARY_NAME);
  if (!empty($jcarousel_path)) {

    // Attempt to use minified version of jCarousel plugin.
    if (file_exists($jcarousel_path . '/dist/jquery.jcarousel.min.js')) {
      $jcarousel_path .= '/dist/jquery.jcarousel.min.js';
    }
    elseif (file_exists($jcarousel_path . '/dist/jquery.jcarousel.js')) {
      $jcarousel_path .= '/dist/jquery.jcarousel.js';
    }
    else {
      $jcarousel_path = FALSE;
    }
  }
  else {
    $jcarousel_path = FALSE;
  }
  return $jcarousel_path;
}