You are here

function views_galleriffic_history in Views Galleriffic 7

Same name and namespace in other branches
  1. 6 views_galleriffic.module \views_galleriffic_history()

Return an array depending on whether history js is downloaded.

1 call to views_galleriffic_history()
views_plugin_style_views_galleriffic::options_form in ./views_plugin_style_views_galleriffic.inc
Defines format options.

File

./views_galleriffic.module, line 137
Views Galleriffic module file.

Code

function views_galleriffic_history() {
  if (module_exists('libraries')) {
    $libraries = libraries_get_libraries();

    // Libraries 1.x only checks if directory exits.
    if ($libraries && $libraries['history'] && file_exists($libraries['history'] . '/jquery.history.js')) {
      $history = array(
        'type' => 'select',
        'description' => t("Specifies whether the url's hash and the browser's history cache should update when the current slideshow image changes."),
      );
      return $history;
    }
  }
  $history = array(
    'type' => 'item',
    'description' => t('You must download the history.js and enable the Libraries API module to use this feature. See documentation for details.'),
  );
  return $history;
}