You are here

function video_embed_instagram_video_embed_handler_info in Video Embed Instagram 7

Implements hook_video_embed_handler_info().

This function is used to tell video_embed_field which functions will be used to handle different operations, along with a bit of metadata.

File

./video_embed_instagram.module, line 18
Add a handler for instagram videos to Video Embed Field.

Code

function video_embed_instagram_video_embed_handler_info() {
  $handlers = array();
  $handlers['instagram'] = array(
    'title' => 'Instagram Video',
    'function' => 'video_embed_instagram_handle_video',
    // Thumbnail_function is optional and takes the url
    // and returns the thumbnail url.
    'thumbnail_function' => 'video_embed_instagram_handle_thumbnail',
    'form' => 'video_embed_instagram_form',
    'domains' => array(
      'instagram.com',
    ),
    // Defaults are the defaults to provide to your form
    // (as defined in your form callback).
    'defaults' => array(
      'width' => VIDEO_EMBED_INSTAGRAM_DEFAULT_WIDTH,
      'height' => VIDEO_EMBED_INSTAGRAM_DEFAULT_HEIGHT,
    ),
  );
  return $handlers;
}