smartmenus.install in Smartmenus.js 8
Same filename and directory in other branches
File
smartmenus.installView source
<?php
/**
* hook_requirements
*/
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,
],
];
}
}
Functions
Name | Description |
---|---|
smartmenus_requirements | hook_requirements |