function theme_computed_field_formatter_markup in Computed Field 6
Same name and namespace in other branches
- 5 computed_field.module \theme_computed_field_formatter_markup()
Theme function for 'markup' text field formatter.
File
- ./
computed_field.module, line 392
Code
function theme_computed_field_formatter_markup($element) {
// Make $node easily available
$node = $element['#node'];
// Grab the field
$field = content_fields($element['#field_name']);
// For "some" backwards compatibility
$node_field_item['value'] = $element['#item']['value'];
// Allow the value to be formated from code not stored in DB
$display_func = 'computed_field_' . $field['field_name'] . '_display';
if (function_exists($display_func)) {
$display = $display_func($field, $element);
}
else {
eval($field['display_format']);
}
return check_markup($display);
}