lazyloader.install in Image Lazyloader 8
Same filename and directory in other branches
Contains installation methods for Lazyloader module.
File
lazyloader.installView source
<?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;
}
Functions
Name | Description |
---|---|
lazyloader_requirements | Implements hook_requirements(). |