1 field_ui.admin.inc _field_ui_field_name_exists($value)

Render API callback: Checks if a field machine name is taken.

Parameters

$value: The machine name, not prefixed with 'field_'.

Return value

Whether or not the field machine name is taken.:

File

core/modules/field_ui/field_ui.admin.inc, line 711
Admin page callbacks for the Field UI module.

Code

function _field_ui_field_name_exists($value) {
  if (!empty($value)) {
    // field_info_fields() does not include inactive fields.
    return (bool) field_read_fields(array('field_name' => 'field_' . $value), array('include_inactive' => TRUE, 'include_deleted' => TRUE));
  }
}