hook_field_info

Definition

hook_field_info()
cck.pre-rename/field.php, line 33

Description

Declare information about a field type.

IMPORTANT! - field and widget names will be truncated to 32 characters in the database and in internal arrays, like content_fields().

Return value

An array keyed by field type name. Each element of the array is an associative array with these keys and values:

  • "label": The human-readable label for the field type.

Related topics

Namesort iconDescription
HooksAllow modules to interact with the Drupal core.

Code

<?php
function hook_field_info() {
  return array(
    'number_integer' => array('label' => t('Integer')),
    'number_decimal' => array('label' => t('Decimal')),
  );
}
?>