You are here

function social_comments_field_formatter_settings_form in Open Social 7

Implements hook_field_formatter_settings_form().

File

./social_comments.module, line 222

Code

function social_comments_field_formatter_settings_form($field, $instance, $view_mode, $form, &$form_state) {
  $display = $instance['display'][$view_mode];
  $settings = $display['settings'];
  $element = array();
  if ($display['type'] == 'social_comments_google' || $display['type'] == 'social_comments_facebook' || $display['type'] == 'social_comments_twitter') {
    $element['count'] = array(
      '#type' => 'textfield',
      '#title' => t('Count'),
      '#default_value' => $settings['count'],
      '#description' => t('Count of items to show. Input 0 to display all.'),
    );
  }
  return $element;
}