lazyloader-8.x-1.x-dev/lazyloader.install

lazyloader.install
<?php

/**
 * @file
 * Contains installation methods for Lazyloader module.
 */

/**
 * Implements hook_requirements().
 */
function lazyloader_requirements() {
  $requirements = [];

  if (!file_exists('libraries/lazysizes/lazysizes.js') || !file_exists('libraries/lazysizes/lazysizes.min.js')) {
    $requirements = [
      'lazyloader.library' => [
        'title' => t('Lazyloader'),
        'value' => t('Lazysizes library missing'),
        'description' => t('The lazysizes library could not be located. We automatically fall back to a CDN hosted version of the library. If you wish to host your own version, please place it inside the <em>libraries/lazysizes</em> folder. The library can be downloaded from <a href="https://github.com/aFarkas/lazysizes/releases">https://github.com/aFarkas/lazysizes/releases</a>'),
        'severity' => REQUIREMENT_WARNING,
      ],
    ];
  }

  return $requirements;
}

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

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