lazyloader.api.php in Image Lazyloader 8
Hooks provided by the Lazyloader module.
File
lazyloader.api.phpView source
<?php
/**
* @file
* Hooks provided by the Lazyloader module.
*/
/**
* @addtogroup hooks
* @{
*/
/**
* Alters asset lazyloading.
*
* Settings $vars['lazyloader_ignore'] = TRUE will skip lazyloading for that
* asset.
*
* @param array $vars
* The variables passed in a theme_[responsive_]image() call.
*/
function hook_lazyloader_alter(array &$vars) {
// Skip lazyloading based on the result of some_condition().
if (some_condition($vars)) {
$vars['lazyloader_ignore'] = TRUE;
}
}
/**
* @} End of "addtogroup hooks".
*/
Functions
Name | Description |
---|---|
hook_lazyloader_alter | Alters asset lazyloading. |