function user_revision_menu in User Revision 7.2
Same name and namespace in other branches
- 7 user_revision.module \user_revision_menu()
Implements hook_menu().
File
- ./
user_revision.module, line 23 - Enables user revision.
Code
function user_revision_menu() {
$items['user/%user/revisions'] = array(
'title' => 'Revisions',
'page callback' => 'user_revision_overview',
'page arguments' => array(
1,
),
'access callback' => '_user_revision_access',
'access arguments' => array(
1,
array(
'view user revisions',
'view own user revisions',
),
),
'weight' => 2,
'type' => MENU_LOCAL_TASK,
'file' => 'user_revision.pages.inc',
);
$items['user/%user/revisions/account/view'] = array(
'title' => 'Revisions',
'page callback' => 'user_revision_show',
'page arguments' => array(
1,
5,
),
'access callback' => '_user_revision_access',
'access arguments' => array(
1,
array(
'view user revisions',
'view own user revisions',
),
),
'type' => MENU_LOCAL_TASK,
);
$items['user/%user_revision/revisions/account/%/revert'] = array(
'title' => 'Revert to earlier revision',
'load arguments' => array(
4,
),
'page callback' => 'drupal_get_form',
'page arguments' => array(
'user_revision_revert_confirm',
1,
),
'access callback' => '_user_revision_access',
'access arguments' => array(
1,
array(
'revert user revisions',
'revert own user revisions',
),
),
'type' => MENU_CALLBACK,
'file' => 'user_revision.pages.inc',
);
$items['user/%user_revision/revisions/account/%/delete'] = array(
'title' => 'Delete earlier revision',
'load arguments' => array(
4,
),
'page callback' => 'drupal_get_form',
'page arguments' => array(
'user_revision_delete_confirm',
1,
),
'access callback' => '_user_revision_access',
'access arguments' => array(
1,
array(
'delete user revisions',
'delete own user revisions',
),
),
'type' => MENU_CALLBACK,
'file' => 'user_revision.pages.inc',
);
$items['admin/config/people/revisions'] = array(
'title' => 'Account revisions',
'description' => 'Configure revision settings.',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'user_revision_admin_settings',
),
'access arguments' => array(
'view user revisions',
),
'file' => 'user_revision.admin.inc',
);
return $items;
}