You are here

function views_slideshow_slider_init in Views Slideshow Slider 6.2

Implements hook_init().

File

./views_slideshow_slider.module, line 22
Views Slideshow: slider has options for working with node views.

Code

function views_slideshow_slider_init() {

  // If the jQ module is installed, use that to add the jQuery Cycle plugin.
  // This allows different versions of the plugin to be used.
  $js = FALSE;
  if (module_exists('jq')) {
    $loaded_plugins = jq_plugins();
    if (!empty($loaded_plugins['cycle'])) {
      $js = jq_add('cycle');
    }
  }

  // Otherwise, we'll add the version included with this module.
  if (!$js) {
    drupal_add_js(drupal_get_path('module', 'views_slideshow') . '/js/jquery.cycle.all.min.js');
  }
  $module_path = drupal_get_path('module', 'views_slideshow_slider');
  drupal_add_js($module_path . '/views_slideshow.js', 'module');
  drupal_add_css($module_path . '/views_slideshow.css', 'module');
}