You are here

function template_preprocess_slick_wrapper in Slick Carousel 8

Same name and namespace in other branches
  1. 8.2 templates/slick.theme.inc \template_preprocess_slick_wrapper()
  2. 7.3 templates/slick.theme.inc \template_preprocess_slick_wrapper()

Prepares variables for slick-wrapper.html.twig templates.

File

templates/slick.theme.inc, line 121
Hooks and preprocess functions for the Slick module.

Code

function template_preprocess_slick_wrapper(&$variables) {
  foreach ([
    'attributes',
    'items',
    'settings',
  ] as $key) {
    $variables[$key] = isset($variables['element']["#{$key}"]) ? $variables['element']["#{$key}"] : [];
  }
}