1 field.info.inc field_info_fields($include_deleted = FALSE)

Returns all field definitions.

Return value

An array of field definitions, keyed by field name. Each field has an: additional property, 'bundles', which is an array of all the bundles to which this field belongs keyed by entity type.

Related topics


core/modules/field/field.info.inc, line 699
Field Info API, providing information about available fields and field types.


function field_info_fields($include_deleted = FALSE) {
  $fields = array();
  $info = _field_info_collate_fields();
  foreach ($info['fields'] as $key => $field) {
    if (!$field['deleted'] || $include_deleted) {
      $fields[$field['field_name']] = $field;
  return $fields;