function _bxslider_views_slideshow_library_path in BxSlider - Views slideshow integration 7
Gets the path to the Bxslider library.
String
Return value
The path to the Bxslider library js file, or FALSE if not found.
2 calls to _bxslider_views_slideshow_library_path()
- bxslider_views_slideshow_views_slideshow_slideshow_type_form in ./
bxslider_views_slideshow.views_slideshow.inc - Implements hook_views_slideshow_options_form().
- _bxslider_views_slideshow_add_js in theme/
bxslider_views_slideshow.theme.inc - Helper function to build and pass BxSlider settings to Drupal.
File
- ./
bxslider_views_slideshow.module, line 40 - Integrating BxSlider with Views Slideshow.
Code
function _bxslider_views_slideshow_library_path() {
$library_path = libraries_get_path('bxslider');
if (!empty($library_path)) {
// Attempt to use minified version of bxslider plugin.
$files = glob($library_path . '/jquery.bxslider.min.js');
if ($bxslider_path = array_shift($files)) {
return $bxslider_path;
}
else {
$files = glob($library_path . '/jquery.bxslider.js');
if ($bxslider_path = array_shift($files)) {
return $bxslider_path;
}
}
}
return FALSE;
}