You are here

function _video_embed_field_get_vimeo_id in Video Embed Field 7.2

Helper function to get the Vimeo video's data attributes.

Parameters

string $url: A Vimeo video URL to get the ID of.

Return value

integer|false The video ID, or FALSE if unable to get the video ID.

2 calls to _video_embed_field_get_vimeo_id()
video_embed_field_handle_vimeo in ./video_embed_field.handlers.inc
Handler for Vimeo videos.
video_embed_field_handle_vimeo_thumbnail in ./video_embed_field.handlers.inc
Gets the thumbnail url for vimeo videos.

File

./video_embed_field.handlers.inc, line 478
Provide some handlers for video embed field Other modules can implement the hook_video_embed_handler_info to provide more handlers.

Code

function _video_embed_field_get_vimeo_id($vimeo_data) {
  try {
    $video_id = $vimeo_data['video_id'];
  } catch (Exception $e) {
    $video_id = FALSE;
  }
  return $video_id;
}