You are here

function isotope_check_library in Isotope (with Masonry and Packery) 7.2

Check for the library and return the appropriate scope.

2 calls to isotope_check_library()
isotope_addjs in ./isotope.module
Function to add the right version of the js file.
isotope_requirements in ./isotope.install
Implements hook_requirements().

File

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

Code

function isotope_check_library() {

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

    // Library has been installed correctly, so use it.
    return 'library';
  }
  if (isotope_check_url(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;
}