Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
These are the defined callback functions which CCK will call. They are similar to Drupal's core hooks, but not part of that set. They follow the same naming convention, that is, if your module is named foo and defines a CCK field, then the hook_field function would be named foo_field().
Required CCK hooks for CCK fields
- hook_field_info - To define new field type(s) in your module, use hook_field_info to tell CCK about those types.
For example, number.module defines
number_integer
,number_decimal
, andnumber_float
. And text.module simply definestext
. - hook_field_formatter_info
Required CCK hooks for CCK widgets
Optional CCK hooks
- hook_field
- hook_field_settings
- hook_widget_settings
- hook_widget_info
- hook_default_value
- ... many to be added ...