function fc_file_field_is_complete in Field Complete 7
Use the default 'empty' hook to see if each entry has content
File
- plugins/
fields/ file.inc, line 25
Code
function fc_file_field_is_complete($items, $instance, $field, &$completed = array()) {
$module = $field['module'];
$check_fields = !empty($instance['settings']['fc']['fc_check_fields']);
foreach ($items as $delta => $item) {
// Apply the initial test to see if this is a uploaded file
$completed[$delta] = !module_invoke($module, 'field_is_empty', $item, $field);
if ($completed[$delta] && $check_fields && !empty($item['fc'])) {
// If it also has completeness check it's fields
$completed[$delta] = $item['fc']->complete;
}
}
}