function readmore_field_formatter_settings_summary in Readmore 7
Implements hook_field_formatter_settings_summary().
File
- ./
readmore.field.inc, line 94 - Field formatter hooks to implement a readmore.
Code
function readmore_field_formatter_settings_summary($field, $instance, $view_mode) {
$display = $instance['display'][$view_mode];
$settings = $display['settings'];
$summary = '';
if ($display['type'] == 'readmore') {
$summary[] = t('Trim length: @length', array(
'@length' => $settings['readmore_trim_length'],
));
$summary[] = t('Text for more link: @more_text', array(
'@more_text' => $settings['readmore_more_text'],
));
$summary[] = t('Text for less link: @less_text', array(
'@less_text' => $settings['readmore_less_text'],
));
$summary[] = $settings['readmore_trim_on_break'] ? t('Trim on @break', array(
'@break' => '<!--break-->',
)) : t('Do not trim on @break', array(
'@break' => '<!--break-->',
));
$summary[] = $settings['readmore_show_readless'] ? t('Show read less') : t('Do not show read less');
$summary[] = $settings['readmore_ellipsis'] ? t('Add ellipsis') : t('Do not add ellipsis');
$summary[] = $settings['readmore_wordsafe'] ? t('Safe words') : t('Do not safe words');
}
return implode('<br />', $summary);
}