You are here

function slick_get_dimensions in Slick Carousel 7.2

Same name and namespace in other branches
  1. 7.3 slick.deprecated.inc \slick_get_dimensions()

Defines image style dimensions once for all images as it costs a bit.

6 calls to slick_get_dimensions()
slick_extract_image_data in includes/slick.global.inc
Extracts the needed image data.
slick_format_field_collection in includes/slick.field_collection.inc
Formats Field collection data.
slick_format_image in includes/slick.image.inc
Formats core image data.
slick_format_media in includes/slick.media.inc
Formats image/media file data.
slick_format_paragraphs in includes/slick.paragraphs.inc
Formats Paragraphs data.

... See full list

File

includes/slick.global.inc, line 238
Global functions across Slick field formatters and Views.

Code

function slick_get_dimensions($media = array(), $image_style = 'large') {
  $dimensions = array(
    'height' => isset($media['height']) ? $media['height'] : NULL,
    'width' => isset($media['width']) ? $media['width'] : NULL,
  );
  image_style_transform_dimensions($image_style, $dimensions);
  $dimensions['_dimensions'] = TRUE;
  return $dimensions;
}