You are here

function superfish_get_path in Superfish 7

Same name and namespace in other branches
  1. 6 superfish.module \superfish_get_path()

Helper function to get library paths.

4 calls to superfish_get_path()
superfish_block_configure in ./superfish.module
Implements hook_block_configure().
superfish_effects in ./superfish.module
Generate a list of available slide-in effects.
superfish_library in ./superfish.module
Add require JavaScript and CSS files from the Superfish library.
superfish_styles in ./superfish.module
Get a list of CSS files that can be used for styles.

File

./superfish.module, line 1670
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);
  }
  elseif (file_exists('profiles/' . drupal_get_profile() . '/libraries/' . $library)) {
    $directory = 'profiles/' . drupal_get_profile() . '/libraries/' . $library;
  }
  if (empty($directory)) {
    $directory = 'sites/all/libraries/' . $library;
  }
  return $directory;
}