function theme_emvideo_video_embed in Embedded Media Field 6
Same name and namespace in other branches
- 6.3 contrib/emvideo/emvideo.theme.inc \theme_emvideo_video_embed()
- 6.2 contrib/emvideo/emvideo.theme.inc \theme_emvideo_video_embed()
Formatter for emvideo_video_embed. This will return the 'embed code', typically used to embed media in an external site or blog.
File
- contrib/
emvideo/ emvideo.theme.inc, line 13 - This defines the various theme functions for Embedded Video Field (emvideo).
Code
function theme_emvideo_video_embed($field, $item, $formatter, $node, $options = array()) {
/*
Note you can use this in node.tpl.php, substituting the proper field type:
$field_type = 'field_video';
$system_types = _content_type_info();
$field = $system_types['fields'][$field_type];
$field['widget'] = $system_types['content types'][$node->type]['fields'][$field_type]['widget'];
print theme('emvideo_video_embed', $field, $node->{$field_type}[0], 'emvideo_embed', $node);
or you can set $field to NULL and just use the options array
*/
$output = '';
if (isset($item['value']) && isset($item['provider'])) {
$output .= drupal_get_form('emvideo_embed_form', $field, $item, $formatter, $node, $options);
}
return $output;
}