function diff_entity_info_alter in Diff 7.3
Implements hook_entity_info_alter().
Although the module only provides an UI for comparing nodes, it has an extendable API for any entity, so we supply two view modes for all entities.
- diff_standard: This view mode is used to tell the module how to compare individual fields. This is used on the revisions page.
File
- ./
diff.module, line 252 - Provides functionality to show a diff between two node revisions.
Code
function diff_entity_info_alter(&$entity_info) {
foreach (array_keys($entity_info) as $entity_type) {
if (!empty($entity_info[$entity_type]['view modes'])) {
$entity_info[$entity_type]['view modes'] += array(
'diff_standard' => array(
'label' => t('Revision comparison'),
'custom settings' => FALSE,
),
);
}
}
}