function _barcode_sanitize in Barcode 7.2
change token to appropriate values.
1 call to _barcode_sanitize()
- barcode_field_prepare_view in ./
barcode.module - Implements hook_field_prepare_view().
File
- ./
barcode.module, line 425
Code
function _barcode_sanitize(&$item, $delta, &$field, $instance, $entity, $entity_type) {
if (empty($item['value'])) {
return;
}
if (is_numeric($entity)) {
$entity = entity_load_single($entity_type, $entity);
}
$item['value'] = token_replace($item['value'], array(
$entity_type => $entity,
), array(
'clear' => 1,
));
}