You are here

function hook_slick_attach_info_alter in Slick Carousel 7.2

Alter Slick attach information before they are called.

This function lives in a module file, not my_module.slick.inc.

Parameters

array $attach: The modified array of $attach information from slick_attach().

array $settings: An array of settings to check for the supported features.

See also

slick_attach()

slick_example.module

File

./slick.api.php, line 332
Hooks and API provided by the Slick module.

Code

function hook_slick_attach_info_alter(array &$attach, array $settings = []) {

  // Disable inline CSS after copying the output to theme at final stage.
  // Inline CSS are only used for 1 case now: Field collection
  // individual slide color.
  // If you need to turn images into CSS background, use 'Use CSS background'
  // option instead, be sure to have Aspect ratio enabled, or min-height, to
  // selector .media--background accordingly, otherwise collapsed container.
  // @see slick_slick_skins_info()
  $attach['attach_inline_css'] = NULL;

  // Disable module JS: slick.load.min.js to use your own slick JS.
  $attach['attach_module_js'] = FALSE;
}