Code: Select all
/**
* Gets a vimeo thumbnail url
* @param mixed $id A vimeo id (ie. 1185346)
* @return thumbnail's url
* http://stackoverflow.com/a/10503411
* usage: {vimeothumb id='1185346'}
*/
$id = $params['id'];
$data = file_get_contents("http://vimeo.com/api/v2/video/$id.json");
$data = json_decode($data);
return $data[0]->thumbnail_large;
Code: Select all
usage: {vimeothumb id='1185346'}