function social_comments_field_formatter_settings_summary in Open Social 7
Implements hook_field_formatter_settings_summary().
File
- ./
social_comments.module, line 241
Code
function social_comments_field_formatter_settings_summary($field, $instance, $view_mode) {
$summary = array();
$display = $instance['display'][$view_mode];
$settings = $display['settings'];
if ($display['type'] == 'social_comments_google' || $display['type'] == 'social_comments_facebook' || $display['type'] == 'social_comments_twitter') {
$count = $settings['count'];
if (!empty($count)) {
$summary[] = t('Display: @count items', array(
'@count' => $count,
));
}
else {
$summary[] = t('Display all items');
}
}
return implode('</ br>', $summary);
}