You are here

function editor_note_field_insert in Editor Notes 7

Implements hook_field_insert().

Executes once on adding new entity to the database.

File

./editor_note.module, line 788
Main functionality for Editor Notes module.

Code

function editor_note_field_insert($entity_type, $entity, $field, $instance, $langcode, &$items) {
  if ($field['type'] == 'editor_note') {
    foreach ($items as $item) {
      editor_note_save($item['note'], $entity_type, $entity, $field['field_name']);
    }
  }
}