You are here

function node_entity_diff in Diff 7.3

Implements hook_entity_diff() on behalf of the Node module.

File

./diff.module, line 698
Provides functionality to show a diff between two node revisions.

Code

function node_entity_diff($old_node, $new_node, $context) {
  $result = array();
  if ($context['entity_type'] == 'node') {
    module_load_include('inc', 'diff', 'includes/node');
    $options = variable_get('diff_additional_options_node', array(
      'title' => 'title',
    ));
    foreach (node_entity_diff_options('node') as $key => $option_label) {
      if (!empty($options[$key])) {
        $func = '_node_entity_diff_additional_options_' . $key;
        $result[$key] = $func($old_node, $new_node, $context);
      }
    }
  }
  return $result;
}