You are here

function date_node_import_values_alter in Node import 6

Implementation of hook_node_import_values_alter().

File

supported/date/date.inc, line 49
Support file for the CCK Date module.

Code

function date_node_import_values_alter(&$values, $type, $defaults, $options, $fields, $preview) {
  foreach (node_import_cck_fields($type, 'date') as $fieldname => $fieldinfo) {
    switch ($fieldinfo['widget']['type']) {

      // Select List
      default:
      case 'date_select':
        date_node_import_values_alter_date_select($values, $fields, $fieldname, $fieldinfo);
        break;

      // Text Field with custom input format
      case 'date_text':
        date_node_import_values_alter_date_text($values, $fields, $fieldname, $fieldinfo);
        break;

      // Text Field with Date Pop-up calendar
      case 'date_popup':
        date_node_import_values_alter_date_popup($values, $fields, $fieldname, $fieldinfo);
        break;
    }
  }
}