You are here

function views_isotope_check_library in Views Isotope (Deprecated) 7.2

Check for the library and return the appropriate scope.

2 calls to views_isotope_check_library()
views_isotope_addjs in ./views_isotope.module
Function to add the right version of the js file.
views_isotope_requirements in ./views_isotope.install
Implements hook_requirements().

File

./views_isotope.module, line 161
Load the isotope library and provide configuration and theme options.

Code

function views_isotope_check_library() {

  // @TODO: Cache the result.
  if (function_exists('libraries_get_path') && file_exists(libraries_get_path('isotope') . '/' . VIEWS_ISOTOPE_FILENAME) === TRUE) {

    // Library has been installed correctly, so use it.
    return 'library';
  }
  if (views_isotope_check_url(VIEWS_ISOTOPE_CDN_PATH)) {

    // Library has not been installed correctly, but the cdn is available.
    return 'cdn';
  }

  // Neither option is available. Throw an error.
  return FALSE;
}