function masonry_requirements in Masonry API 7
Same name and namespace in other branches
- 8 masonry.install \masonry_requirements()
- 7.3 masonry.install \masonry_requirements()
- 7.2 masonry.install \masonry_requirements()
Implements hook_requirements().
File
- ./
masonry.install, line 10 - Install, update and uninstall functions for the Masonry module.
Code
function masonry_requirements($phase) {
$requirements = array();
$t = get_t();
if ($phase == 'runtime') {
$library = libraries_detect('masonry');
$requirements['masonry'] = array(
'title' => $t('jQuery Masonry'),
);
if ($library['installed']) {
$requirements['masonry']['value'] = $library['version'];
$requirements['masonry']['severity'] = REQUIREMENT_OK;
}
else {
$requirements['masonry']['value'] = $library['error'];
$requirements['masonry']['description'] = $library['error message'];
$requirements['masonry']['severity'] = REQUIREMENT_ERROR;
}
}
return $requirements;
}