function superfish_library_version in Superfish 8
Same name and namespace in other branches
- 6 superfish.install \superfish_library_version()
- 7 superfish.install \superfish_library_version()
Checks Superfish library version.
1 call to superfish_library_version()
- superfish_requirements in ./
superfish.install - Implements hook_requirements().
1 string reference to 'superfish_library_version'
- superfish_libraries_info in ./
superfish.module - Implements hook_libraries_info().
File
- ./
superfish.module, line 265 - The jQuery Superfish plugin for Drupal menus.
Code
function superfish_library_version() {
// Get the library version.
if (($directory = superfish_library_path()) && file_exists($directory . '/VERSION')) {
$version = file_get_contents($directory . '/VERSION');
if ($version === FALSE) {
return NULL;
}
// Removing blank lines and white spaces.
$version = preg_replace("/(^[\r\n]*|[\r\n]+)[\\s\t]*[\r\n]+/", "\n", trim($version));
if (!empty($version)) {
return $version;
}
return FALSE;
}
return FALSE;
}