You are here

function _views_slideshow_jcarousel_library_path in Views Slideshow JCarousel 6

Same name and namespace in other branches
  1. 7.2 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.

1 call to _views_slideshow_jcarousel_library_path()
_views_slideshow_jcarousel_preprocess_pager in theme/views_slideshow_jcarousel.theme.inc
Theme pager fields

File

./views_slideshow_jcarousel.module, line 29

Code

function _views_slideshow_jcarousel_library_path() {
  $jcarousel_path = libraries_get_path('jcarousel');
  if (!empty($jcarousel_path)) {

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