function modernizr_lib_path in Modernizr 6
Get modernizr file path.
Return value
string path to modernizr file
2 calls to modernizr_lib_path()
- modernizr_init in ./
modernizr.module - Implements hook_init().
- modernizr_requirements in ./
modernizr.install - Implements hook_requirements.
File
- ./
modernizr.module, line 19 - Main module file for Modernizr
Code
function modernizr_lib_path() {
static $path = NULL;
if (is_null($path)) {
if (module_exists('libraries')) {
$path = libraries_get_path('modernizr');
}
else {
$path = drupal_get_path('module', 'modernizr');
}
$version_agnostic_path = file_exists($path . '/modernizr.min.js') ? $path . '/modernizr.min.js' : FALSE;
if (!$version_agnostic_path) {
$path = file_exists($path . '/modernizr.js') ? $path . '/modernizr.js' : FALSE;
}
else {
$path = $version_agnostic_path;
}
}
return $path;
}