function photoswipe_requirements in PhotoSwipe 6
Same name and namespace in other branches
- 8.2 photoswipe.install \photoswipe_requirements()
- 8 photoswipe.install \photoswipe_requirements()
- 7.2 photoswipe.install \photoswipe_requirements()
- 7 photoswipe.install \photoswipe_requirements()
- 3.x photoswipe.install \photoswipe_requirements()
Implementation of hook_requirements().
This hook will issue warnings if:
- PhotoSwipe relies on local files and the source files are not found
File
- ./
photoswipe.install, line 22 - PhotoSwipe Module for Drupal 6.x
Code
function photoswipe_requirements($phase) {
$requirements = array();
$t = get_t();
// Ensure translations don't break at install time
if ($phase == 'runtime') {
$requirements['photoswipe'] = array(
'title' => $t('PhotoSwipe'),
'value' => $t('Installed correctly'),
'severity' => REQUIREMENT_OK,
);
if (!_photoswipe_requirements_isinstalled()) {
$requirements['photoswipe']['value'] = $t('Third party PhotoSwipe software not properly installed');
$requirements['photoswipe']['description'] = $t('PhotoSwipe was not found in the \'libraries\' folder (e.g. sites/all/libraries).');
$requirements['photoswipe']['severity'] = REQUIREMENT_ERROR;
}
}
return $requirements;
}