function oembed_element_info in oEmbed 7.0
Same name and namespace in other branches
- 7 oembed.module \oembed_element_info()
Implements hook_element_info().
File
- ./
oembed.module, line 316
Code
function oembed_element_info() {
// 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',
),
);
if (module_exists('media')) {
// Retrieves an image (photo or thumbnail) with a fallback.
$types['oembed_wysiwyg'] = 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_wysiwyg',
),
);
}
return $types;
}