Edit field output after the field module has performed the operation. This gives you possibility to alter the field output before rendered in your module. This works with display suite and other rendering extensions as well.
Source code viewer
// https://api.drupal.org/api/drupal/modules!field!field.api.php/function/hook_field_attach_view_alter/7 /** * Implements hook_field_attach_view_alter(). */ function HOOK_field_attach_view_alter(&$output, $context) { if ($output['#entity_type'] === 'node' && $output['#bundle'] === 'article') { } }Programming Language: PHP