You are here

function hook_blazy_alter in Blazy 7

Same name and namespace in other branches
  1. 8.2 blazy.api.php \hook_blazy_alter()
  2. 8 blazy.api.php \hook_blazy_alter()

Alters Blazy individual item output to support a custom lightbox.

Parameters

array $build: The renderable array of image being modified.

array $settings: The available array of settings.

Related topics

1 invocation of hook_blazy_alter()
BlazyManager::getBlazy in src/BlazyManager.php
Returns the enforced content, or image using theme_blazy().

File

./blazy.api.php, line 209
Hooks and API provided by the Blazy module.

Code

function hook_blazy_alter(array &$build, array $settings = []) {
  if (!empty($settings['media_switch']) && $settings['media_switch'] == 'photoswipe') {
    $build['#pre_render'][] = 'my_module_pre_render';
  }
}