You are here

function mailchimp_lists_field_insert in Mailchimp 7.4

Same name and namespace in other branches
  1. 7.5 modules/mailchimp_lists/includes/mailchimp_lists.field.inc \mailchimp_lists_field_insert()
  2. 7.3 modules/mailchimp_lists/includes/mailchimp_lists.field.inc \mailchimp_lists_field_insert()

Implements hook_field_insert().

File

modules/mailchimp_lists/includes/mailchimp_lists.field.inc, line 646
Field hooks.

Code

function mailchimp_lists_field_insert($entity_type, $entity, $field, $instance, $langcode, &$items) {

  // This is a new entity, so only process subscription choice if it is an
  // opt-in.
  if (!empty($items[0]['subscribe'])) {
    _mailchimp_lists_field_postsave($entity_type, $entity, $field, $instance, $langcode, $items);
  }
}