function emvideo_field in Embedded Media Field 6.3
Same name and namespace in other branches
- 6 contrib/emvideo/emvideo.module \emvideo_field()
- 6.2 contrib/emvideo/emvideo.module \emvideo_field()
Implementation of hook_field().
File
- contrib/
emvideo/ emvideo.module, line 290 - Embedded Video module is a handler for 3rd party video files.
Code
function emvideo_field($op, &$node, $field, &$items, $teaser, $page) {
$ret = emfield_emfield_field($op, $node, $field, $items, $teaser, $page, 'emvideo');
if ($op == 'presave') {
foreach ($items as $delta => $item) {
$duration = emfield_include_invoke('emvideo', $item['provider'], 'duration', $item);
$items[$delta]['duration'] = $duration ? $duration : 0;
}
}
return $ret;
}