You are here

function geshifield_widget in GeSHi Filter for syntax highlighting 6

Implementation of hook_widget().

File

geshifield/geshifield.module, line 212
Defines a CCK field for source code with GeSHi syntax highlighting.

Code

function geshifield_widget(&$form, &$form_state, $field, $items, $delta = 0) {
  $element = array(
    '#type' => $field['widget']['type'],
    '#default_value' => isset($items[$delta]) ? $items[$delta] : '',
  );
  return $element;
}