function share42_requirements in Share42 - social sharing buttons 7
Same name and namespace in other branches
- 6 share42.install \share42_requirements()
- 7.2 share42.install \share42_requirements()
Implements hook_requirements().
File
- ./
share42.install, line 22 - Install, update and uninstall functions for the share42 module.
Code
function share42_requirements($phase) {
$requirements = array();
// Ensure translations don't break at install time
$t = get_t();
if ($phase == 'runtime') {
if ($library_path = _share42_library_path()) {
$requirements['share42'] = array(
'title' => $t('Share42 library'),
'value' => _share42_library_version() . ' (' . $library_path . ')',
'severity' => REQUIREMENT_OK,
);
}
else {
$requirements['share42'] = array(
'title' => $t('Share42 library'),
'value' => $t('Share42 library is missing'),
'severity' => REQUIREMENT_ERROR,
);
}
}
return $requirements;
}