function views_isotope_check_library in Brainstorm profile 7
Check for the library and return the appropriate scope.
2 calls to views_isotope_check_library()
- views_isotope_addjs in modules/
custom/ views_isotope/ views_isotope.module - Function to add the right version of the js file.
- views_isotope_requirements in modules/
custom/ views_isotope/ views_isotope.install - Implements hook_requirements().
File
- modules/
custom/ views_isotope/ views_isotope.module, line 162 - 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;
}