function emfield_emfield_field_formatter in Embedded Media Field 5
Same name and namespace in other branches
- 6.3 deprecated/emfield-deprecated.inc \emfield_emfield_field_formatter()
- 6 emfield.module \emfield_emfield_field_formatter()
- 6.2 emfield.module \emfield_emfield_field_formatter()
1 call to emfield_emfield_field_formatter()
- _eminline_url_parse_full_links in contrib/eminline/eminline.module
- If one of our allowed providers knows what to do with the url let them embedd the video.
File
- ./emfield.module, line 316
Code
function emfield_emfield_field_formatter($field, $item, $formatter, $node, $module, $options = array()) {
if ($node->in_preview) {
$item = emfield_parse_embed($field, $item['embed'], $module);
}
if (!isset($item['value'])) {
return '';
}
if (!$node->type) {
$type = content_types($field['type_name']);
$field['widget'] = $type['fields'][$field['field_name']]['widget'];
}
if (!is_array($item['data'])) {
$item['data'] = (array) unserialize($item['data']);
}
$output .= theme($module . '_' . $formatter, $field, $item, $formatter, $node, $options);
return $output;
}