You are here

function phone_field in Phone 5

Same name and namespace in other branches
  1. 6 phone.module \phone_field()

Implementation of hook_field().

File

./phone.module, line 59
Defines phone number fields for CCK. Provide some verifications on the phone numbers

Code

function phone_field($op, &$node, $field, &$node_field, $teaser, $page) {
  switch ($op) {
    case 'view':
      foreach ($node_field as $delta => $item) {
        $node_field[$delta]['view'] = content_format($field, $item, 'default', $node);
      }
      return theme('field', $node, $field, $node_field, $teaser, $page);
  }
}