You are here

function superfish_library_check in Superfish 8

Same name and namespace in other branches
  1. 7 superfish.install \superfish_library_check()

Verifies Superfish library is present.

2 calls to superfish_library_check()
superfish_install in ./superfish.install
Implements hook_enable().
superfish_requirements in ./superfish.install
Implements hook_requirements().

File

./superfish.module, line 246
The jQuery Superfish plugin for Drupal menus.

Code

function superfish_library_check() {
  if (function_exists('libraries_get_libraries')) {
    $library = libraries_get_libraries();
    if (isset($library['superfish']) || isset($library['Superfish'])) {
      return TRUE;
    }
  }
  else {
    $directory = superfish_library_path();
    if ($directory && file_exists($directory . '/superfish.js')) {
      return TRUE;
    }
  }
  return FALSE;
}