You are here

function link_field_formatter_settings_summary in Link 7

Implements hook_field_formatter_settings_summary().

File

./link.module, line 1284
Defines simple link field types.

Code

function link_field_formatter_settings_summary($field, $instance, $view_mode) {
  $display = $instance['display'][$view_mode];
  if ($display['type'] == 'link_domain') {
    if ($display['settings']['strip_www']) {
      return t('Strip www. from domain');
    }
    else {
      return t('Leave www. in domain');
    }
  }
  if ($display['type'] == 'link_default') {
    if ($display['settings']['custom_title']) {
      return t('Title: %title', array(
        '%title' => $display['settings']['custom_title'],
      ));
    }
  }
  return '';
}