function emvideo_embed_form in Embedded Media Field 6
Same name and namespace in other branches
- 6.3 contrib/emvideo/emvideo.module \emvideo_embed_form()
- 6.2 contrib/emvideo/emvideo.module \emvideo_embed_form()
1 string reference to 'emvideo_embed_form'
- theme_emvideo_video_embed in contrib/
emvideo/ emvideo.theme.inc - 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.module, line 543 - Embedded Video module is a handler for 3rd party video files.
Code
function emvideo_embed_form($form_state = NULL, $field, $item, $formatter, $node, $options = array(), $other = array()) {
$embed = $item['value'];
$width = !empty($options['width']) ? $options['width'] : $field['widget']['video_width'];
$height = !empty($options['height']) ? $options['height'] : $field['widget']['video_height'];
$autoplay = !empty($options['autoplay']) ? $options['autoplay'] : $field['widget']['video_autoplay'];
$title = !empty($options['title']) ? $options['title'] : t('Embed Code');
$description = !empty($options['description']) ? $options['description'] : t('To embed this video on your own site, simply copy and paste the html code from this text area.');
$text = module_invoke('emfield', 'include_invoke', 'emvideo', $item['provider'], 'video', $embed, $width, $height, $field, $item, $node, $autoplay);
$form = array();
$form['emvideo_embed'] = array(
'#type' => 'textarea',
'#title' => $title,
'#description' => $description,
'#default_value' => $text,
);
return $form;
}