You are here

function _get_vimeo_thumbnail in Shadowbox 8

Same name and namespace in other branches
  1. 7.4 file_shadowbox/file_shadowbox.module \_get_vimeo_thumbnail()

Get vimeo thumbnail.

1 call to _get_vimeo_thumbnail()
FileShadowboxFormatter::viewElements in file_shadowbox/lib/Drupal/file_shadowbox/Plugin/Field/FieldFormatter/FileShadowboxFormatter.php
Builds a renderable array for a field value.

File

file_shadowbox/file_shadowbox.module, line 14
File Shadowbox, a JavaScript media viewer application for displaying content in a modal dialogue for file field.

Code

function _get_vimeo_thumbnail($id) {
  $hash = unserialize(file_get_contents("http://vimeo.com/api/v2/video/{$id}.php"));
  return $hash[0]['thumbnail_medium'];
}