function shariff_field_formatter_settings_form in Shariff Social Media Buttons 7
Implements hook_field_formatter_settings_form().
File
- ./
shariff.module, line 474 - Integrating Shariff library, providing settings form and block.
Code
function shariff_field_formatter_settings_form($field, $instance, $view_mode, $form, &$form_state) {
$display = $instance['display'][$view_mode];
$settings = $display['settings'];
$element = array();
$element['hide_by_default'] = array(
'#type' => 'checkbox',
'#title' => t('Hide buttons by default for existing entities'),
'#description' => t('Check this if you want to hide the share buttons on entities created previous to installing/enabling Shariff.
If unchecked the share buttons will appear on all previously existing entities.'),
'#default_value' => $settings['hide_by_default'],
);
return $element;
}