elevate_image_zoom-9.1.x-dev/elevate_image_zoom.install

elevate_image_zoom.install
<?php

/**
 * @file
 * Implements installation hooks.
 */

/**
 * Implements hook_requirements().
 */
function elevate_image_zoom_requirements($phase) {
  $requirements = [];
  switch ($phase) {
    case 'install':
    case 'runtime':
      $file_exists = file_exists(DRUPAL_ROOT . '/libraries/elevatezoom/jquery.elevatezoom.js');
      if ($file_exists) {
        $message = t('ElevateZoom plugin detected in %path.', ['%path' => '/libraries/elevatezoom']);
      }
      else {
        $message = t('The elevate zoom plugin was not found. Please <a href=":repository_url" target="_blank">download</a> and save into the libraries folder in the root (/libraries/elevatezoom/jquery.elevatezoom.js).', [':repository_url' => 'http://www.elevateweb.co.uk/download-file']);
      }
      $requirements['elevate_image_zoom'] = [
        'title' => t('Elevate_image_zoom Plugin'),
        'description' => $message,
        'severity' => $file_exists ? REQUIREMENT_OK : REQUIREMENT_ERROR,
      ];
      break;
  }
  return $requirements;
}

Главная | Обратная связь

drupal hosting | друпал хостинг | it patrol .inc