You are here

function diff_menu_alter in Diff 7.2

Same name and namespace in other branches
  1. 6.2 diff.module \diff_menu_alter()
  2. 6 diff.module \diff_menu_alter()
  3. 7.3 diff.module \diff_menu_alter()

Implements hook_menu_alter().

File

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

Code

function diff_menu_alter(&$callbacks) {

  // Overwrite the default 'Revisions' page
  $callbacks['node/%node/revisions']['page callback'] = 'diff_diffs_overview';
  $callbacks['node/%node/revisions']['module'] = 'diff';
  $callbacks['node/%node/revisions']['file'] = 'diff.pages.inc';
  $callbacks['node/%node/revisions/%/view']['tab_parent'] = 'node/%/revisions/list';
  $callbacks['node/%node/revisions/%/revert']['tab_parent'] = 'node/%/revisions/%/view';
  $callbacks['node/%node/revisions/%/delete']['tab_parent'] = 'node/%/revisions/%/view';
  $callbacks['node/%node/revisions']['access callback'] = $callbacks['node/%node/revisions/%/view']['access callback'] = $callbacks['node/%node/revisions/%/revert']['access callback'] = $callbacks['node/%node/revisions/%/delete']['access callback'] = 'diff_node_revision_access';
  return;
}