You are here

function oembed_pre_render_image_helper in oEmbed 7.0

Same name and namespace in other branches
  1. 7 oembed.module \oembed_pre_render_image_helper()

Set the properties for a themed image.

This function takes the element by reference because it should never be called as a pre render function despite appearances.

2 calls to oembed_pre_render_image_helper()
oembed_pre_render_thumbnail in ./oembed.module
Change oEmbed request into a thumbnail.
oembed_pre_render_wysiwyg in ./oembed.module
Converts oEmbed response to a plain image.

File

./oembed.module, line 404

Code

function oembed_pre_render_image_helper(&$element, $prefix = '') {
  $embed = $element['#embed'];
  $element['#path'] = $embed[$prefix . 'url'];
  $element['#alt'] = oembed_alt_attr($embed);
  $element['#title'] = $embed['title'];
  $element['#attributes'] = $element['#attributes'];
  $element['#height'] = isset($embed[$prefix . 'height']) ? $embed[$prefix . 'height'] : NULL;
  $element['#width'] = isset($embed[$prefix . 'width']) ? $embed[$prefix . 'width'] : NULL;
}