You are here

function editor_note_field_is_empty in Editor Notes 7

Implements hook_field_is_empty().

Defines whether to save field value to the database.

File

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

Code

function editor_note_field_is_empty($item, $field) {
  if ($field['type'] == 'editor_note') {
    if (is_array($item['note'])) {
      return empty($item['note']['value']);
    }
    else {
      return empty($item['note']);
    }
  }
}