1 link.module link_field_formatter_settings_form($field, $instance, $view_mode, $form, &$form_state)

Implements hook_field_formatter_settings_form().

File

core/modules/link/link.module, line 963
Defines simple link field types.

Code

function link_field_formatter_settings_form($field, $instance, $view_mode, $form, &$form_state) {
  $display = $instance['display'][$view_mode];
  $settings = $display['settings'];
  $element = array();
  if ($display['type'] == 'link_domain') {
    $element['strip_www'] = array(
      '#title' => t('Strip www. from domain'),
      '#type' => 'checkbox',
      '#default_value' => $settings['strip_www'],
    );
  }
  return $element;
}