You are here

function views_quicksand_get_path in Views Quicksand 7

Return the path to the jQuery Quicksand plugin.

2 calls to views_quicksand_get_path()
views_quicksand_enable in ./views_quicksand.install
Implements hook_enable().
views_quicksand_requirements in ./views_quicksand.install
Implements hook_requirements().

File

./views_quicksand.module, line 54
jQuery Plugin that provides a nice animation for filtering or reordering lists of content.

Code

function views_quicksand_get_path() {
  static $library_path = NULL;

  // Try to locate the library path in any possible setup.
  if ($library_path == NULL) {

    // First check the default location.
    $path = variable_get('views_quicksand_path', VIEWS_QUICKSAND_PATH);
    if (file_exists($path . '/jquery.quicksand.js')) {
      $library_path = $path;
    }
    else {
      if ($path = libraries_get_path('jquery.quicksand')) {
        $library_path = $path;
        variable_set('views_quicksand_path', $library_path);
      }
      else {
        $library_path = VIEWS_QUICKSAND_PATH;
      }
    }
  }
  return $library_path;
}