function addthis_displays_field_formatter_settings_summary in AddThis 7.4
Implements hook_field_formatter_settings_summary().
File
- addthis_displays/
addthis_displays.field.inc, line 132 - Defines field implementations.
Code
function addthis_displays_field_formatter_settings_summary($field, $instance, $view_mode) {
$view = $instance['display'][$view_mode];
$info = '';
switch ($view['type']) {
case 'addthis_basic_toolbox':
$settings = $view['settings'];
$services = trim($settings['share_services']);
$services = str_replace(' ', '', $services);
$services = '<b>' . implode(', ', explode(',', $services)) . '</b>';
$info = t('Toolbox with the following services: !services', array(
'!services' => $services,
));
break;
case 'addthis_basic_button':
$settings = $view['settings'];
$size = '<b>' . $settings['button_size'] . '</b>';
$info = t('Basic button size: !size', array(
'!size' => $size,
));
break;
}
return $info;
}