You are here

function oembed_element_info in oEmbed 7

Same name and namespace in other branches
  1. 7.0 oembed.module \oembed_element_info()

Implements hook_element_info().

File

./oembed.module, line 367
Core functionality for oEmbed

Code

function oembed_element_info() {
  $types = array();

  // Standard oEmbed that changes its theme based on response.
  $types['oembed'] = array(
    '#theme' => 'oembed',
    '#embed' => NULL,
    '#parameters' => array(),
    '#attributes' => array(),
    '#pre_render' => array(
      'oembed_pre_render_fetch',
      'oembed_pre_render_retheme',
    ),
  );

  // Retrieves an image (photo or thumbnail) or nothing.
  $types['oembed_thumbnail'] = array(
    '#theme' => 'image',
    '#path' => NULL,
    '#width' => NULL,
    '#height' => NULL,
    '#alt' => '',
    '#title' => NULL,
    '#attributes' => array(),
    '#embed' => NULL,
    '#parameters' => array(),
    '#pre_render' => array(
      'oembed_pre_render_fetch',
      'oembed_pre_render_thumbnail',
    ),
  );
  return $types;
}