static function get_video_poster($type, $id) { if ('videopress' == $type) { if (function_exists('video_get_highest_resolution_image_url')) { return video_get_highest_resolution_image_url($id); } else { if (class_exists('VideoPress_Video')) { $video = new VideoPress_Video($id); return $video->poster_frame_uri; } } } else { if ('youtube' == $type) { return 'http://img.youtube.com/vi/' . $id . '/0.jpg'; } } }