function _views_slideshow_jcarousel_library_path in Views Slideshow JCarousel 7
Same name and namespace in other branches
- 6 views_slideshow_jcarousel.module \_views_slideshow_jcarousel_library_path()
- 7.2 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.
2 calls to _views_slideshow_jcarousel_library_path()
- views_slideshow_jcarousel_pager_views_slideshow_widget_pager_form_options in ./
views_slideshow_jcarousel.module - Implementation [widget-type]_views_slideshow_pager_form_options
- _views_slideshow_jcarousel_preprocess_pager in theme/
views_slideshow_jcarousel.theme.inc - Theme pager fields
File
- ./
views_slideshow_jcarousel.module, line 32
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;
}