t($type->title_label), '#old' => array($old_node->title), '#new' => array($new_node->title), '#weight' => -5, '#format' => array( 'show_header' => FALSE, ) ); // @TODO: abstract this to work with all field types and/or split this // integration out to be more generic. $instances = field_info_instances('node', field_extract_bundle('node', $type)); foreach ($instances as $instance) { $field_name = $instance['field_name']; $langcode = field_language('node', $new_node, $field_name); foreach (array_keys($new_node->{$field_name}[$langcode]) as $delta) { $view_old = $old_node->{$field_name}[$langcode][$delta]['value']; $view_new = $new_node->{$field_name}[$langcode][$delta]['value']; $result["{$field_name}_{$delta}"] = array( '#name' => t($instance['label']), '#old' => explode("\n", $view_old), '#new' => explode("\n", $view_new), ); } } return $result; }