Gets the path to the jQuery cycle library.

Return value

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

3 calls to _views_slideshow_cycle_library_path()
template_preprocess_views_slideshow_cycle_main_frame in contrib/views_slideshow_cycle/theme/views_slideshow_cycle.theme.inc
Views Slideshow: Theme the main frame wrapper.
views_slideshow_cycle_requirements in contrib/views_slideshow_cycle/views_slideshow_cycle.install
Implements hook_requirements().
views_slideshow_cycle_views_slideshow_slideshow_type_form in contrib/views_slideshow_cycle/views_slideshow_cycle.views_slideshow.inc
Implements hook_views_slideshow_slideshow_slideshow_type_form().

File

contrib/views_slideshow_cycle/views_slideshow_cycle.module, line 85

Code

function _views_slideshow_cycle_library_path() {
    $cycle_path = libraries_get_path('jquery.cycle');
    if (!empty($cycle_path)) {
        // Attempt to use minified version of jQuery cycle plugin.
        if (file_exists($cycle_path . '/jquery.cycle.all.min.js')) {
            $cycle_path .= '/jquery.cycle.all.min.js';
        }
        elseif (file_exists($cycle_path . '/jquery.cycle.all.js')) {
            $cycle_path .= '/jquery.cycle.all.js';
        }
        else {
            $cycle_path = FALSE;
        }
    }
    else {
        $cycle_path = FALSE;
    }
    return $cycle_path;
}