You are here

function addtocalendar_field_widget_settings_form in Add To Calendar Button (AddEvent.com) 7.2

Implements hook_field_widget_settings_form().

File

./addtocalendar.module, line 165
Contains module code.

Code

function addtocalendar_field_widget_settings_form($field, $instance) {
  $element = [];
  if ($instance['display']['default']['type'] == 'addtocalendar_formatter') {
    $settings = $instance['widget']['settings'];
    $settings['widget_setting_form'] = TRUE;
    $field_list = field_info_instances($instance['entity_type'], $instance['bundle']);

    // Add settings form.
    module_load_include('inc', 'addtocalendar', 'includes/addtocalendar');
    $element = addtocalendar_settings_form($settings, $field_list);
  }
  return $element;
}