You are here

function imagezoom_requirements in Image Zoom 7.2

Implements hook_requirements().

File

./imagezoom.install, line 26
Provides uninstall functions for the Image Zoom module.

Code

function imagezoom_requirements($phase) {
  $t = get_t();
  $requirements = array(
    'imagezoom' => array(
      'title' => $t('Image Zoom'),
    ),
  );
  if ($phase == 'runtime') {
    $library = libraries_detect('elevatezoom-plus');
    if ($library['installed']) {
      $requirements['imagezoom']['value'] = $t('The elevateZoom-Plus library was found.');
      $requirements['imagezoom']['severity'] = REQUIREMENT_OK;
    }
    else {
      $requirements['imagezoom']['value'] = $t('The elevateZoom-Plus library was not found.');
      $requirements['imagezoom']['severity'] = REQUIREMENT_ERROR;
    }
  }
  return $requirements;
}