function slick_get_slick_path in Slick Carousel 7
Get the location of the slick library.
Return value
string. The location of the library, or FALSE if the library isn't installed.
1 call to slick_get_slick_path()
- slick_library in ./
slick.module - Implements hook_library().
File
- ./
slick.module, line 321 - Slick carousel for Drupal.
Code
function slick_get_slick_path() {
if (function_exists('libraries_get_path')) {
return libraries_get_path('slick');
}
// The following logic is taken from libraries_get_libraries()
$searchdir = array();
// Similar to 'modules' and 'themes' directories inside an installation
// profile, installation profiles may want to place libraries into a
// 'libraries' directory.
$searchdir[] = 'profiles/' . drupal_get_profile() . '/libraries';
// Always search sites/all/libraries.
$searchdir[] = 'sites/all/libraries';
// Also search sites/<domain>/*.
$searchdir[] = conf_path() . '/libraries';
foreach ($searchdir as $dir) {
if (file_exists($dir . '/slick/slick.min.js')) {
return $dir . '/slick';
}
}
return FALSE;
}