You are here

function _video_embed_get_min in Video Embed Field 7.2

Calculates the min index for use in finding the id of a youtube video.

Parameters

string $pos1: The first index.

string $pos2: The second index.

Return value

string The min index.

1 call to _video_embed_get_min()
_video_embed_field_get_youtube_id in ./video_embed_field.handlers.inc
Helper function to get the youtube video's id.

File

./video_embed_field.handlers.inc, line 684
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_get_min($pos1, $pos2) {
  if (!$pos1) {
    return $pos2;
  }
  elseif (!$pos2) {
    return $pos1;
  }
  else {
    return min($pos1, $pos2);
  }
}