function superfish_get_path in Superfish 6
Same name and namespace in other branches
- 7 superfish.module \superfish_get_path()
Helper function to get library paths.
2 calls to superfish_get_path()
- superfish_init in ./
superfish.module - Implements hook_init().
- superfish_styles in ./
superfish.module - Get a list of CSS files that can be used for styles.
File
- ./
superfish.module, line 1254 - Enables the use of jQuery Superfish plugin for Drupal menus.
Code
function superfish_get_path($library = 'superfish') {
$directory = '';
// Ensure the Libraries API module is installed.
if (module_exists('libraries') && function_exists('libraries_get_path')) {
$directory = libraries_get_path($library);
}
else {
$directory = 'sites/all/libraries/' . $library;
}
// Just in case the Libraries API could not find the library.
if (empty($directory)) {
$directory = 'sites/all/libraries/' . $library;
}
return $directory;
}