function smartmenus_requirements in Smartmenus.js 8
Same name and namespace in other branches
- 7 smartmenus.install \smartmenus_requirements()
hook_requirements
File
- ./
smartmenus.install, line 6
Code
function smartmenus_requirements($phase) {
if ($phase === 'install') {
if (function_exists('libraries_get_path')) {
$detected = libraries_get_path('smartmenus');
}
else {
$detected = is_dir('libraries/smartmenus');
}
$message = $detected ? ' Library detected.' : ' Library missing. Check the readme file.';
$severity = $detected ? REQUIREMENT_OK : REQUIREMENT_ERROR;
return [
'smartmenus' => [
'title' => 'Smartmenus' . $message,
'severity' => $severity,
],
];
}
}