You are here

function hook_blazy_alter in Blazy 8

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

Alters Blazy individual item output to support a custom lightbox.

Parameters

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

array $settings: The available array of settings.

Related topics

1 function implements hook_blazy_alter()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

blazy_test_blazy_alter in tests/modules/blazy_test/blazy_test.module
Implements hook_blazy_attach_alter().
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 175
Hooks and API provided by the Blazy module.

Code

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