Determines whether a file should be displayed when outputting field content.

Parameters

$item: A field item array.

$field: A field array.

Return value

Boolean TRUE if the file will be displayed, FALSE if the file is hidden.

1 call to file_field_displayed()
file_field_prepare_view in modules/file/file.field.inc
Implements hook_field_prepare_view().

File

modules/file/file.field.inc, line 391
Field module functionality for the File module.

Code

function file_field_displayed($item, $field) {
  if (!empty($field['settings']['display_field'])) {
    return (bool) $item['display'];
  }
  return TRUE;
}