You are here

function views_slideshow_singleframe_init in Views Slideshow 6.2

Implements hook_init().

File

contrib/views_slideshow_singleframe/views_slideshow_singleframe.module, line 11
Views Slideshow: SingleFrame is typically used for field views.

Code

function views_slideshow_singleframe_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_singleframe');
  drupal_add_js($module_path . '/views_slideshow.js', 'module');
  drupal_add_css($module_path . '/views_slideshow.css', 'module');
}