function text_field_formatter_settings_summary

7.x text.module text_field_formatter_settings_summary($field, $instance, $view_mode)

Implements hook_field_formatter_settings_summary().

File

drupal-7.x/modules/field/modules/text/text.module, line 241
Defines simple text field types.

Code

function text_field_formatter_settings_summary($field, $instance, $view_mode) {
  $display = $instance['display'][$view_mode];
  $settings = $display['settings'];

  $summary = '';

  if (strpos($display['type'], '_trimmed') !== FALSE) {
    $summary = t('Trim length') . ': ' . $settings['trim_length'];
  }

  return $summary;
}