You are here

function hook_blazy_alter in Blazy 8.2

Same name and namespace in other branches
  1. 8 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 $build: The renderable array of image/ video iframe 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_alter().
1 invocation of hook_blazy_alter()
BlazyManager::getBlazy in src/BlazyManager.php
Returns the enforced rich media content, or media using theme_blazy().

File

./blazy.api.php, line 174
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';
  }
}