You are here

function realname_menu in Real Name 6

Same name and namespace in other branches
  1. 5 realname.module \realname_menu()
  2. 7 realname.module \realname_menu()

Implements hook_menu().

File

./realname.module, line 69

Code

function realname_menu() {
  $items['admin/user/realname'] = array(
    'title' => 'RealName',
    'description' => "Configure which fields are used to create a user's RealName.",
    'access arguments' => array(
      'administer users',
    ),
    'page callback' => 'realname_admin_settings',
    'file' => 'realname.admin.inc',
  );
  $items['admin/user/realname/general'] = array(
    'title' => 'General',
    'access arguments' => array(
      'administer users',
    ),
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'realname_admin_general',
    ),
    'type' => MENU_DEFAULT_LOCAL_TASK,
    'file' => 'realname.admin.inc',
    'weight' => 0,
  );
  $items['admin/user/realname/fields'] = array(
    'title' => 'Fields',
    'access arguments' => array(
      'administer users',
    ),
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'realname_admin_fields',
    ),
    'type' => MENU_LOCAL_TASK,
    'file' => 'realname.admin.inc',
    'weight' => 2,
  );
  $items['admin/user/realname/module'] = array(
    'title' => 'Module',
    'access arguments' => array(
      'administer users',
    ),
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'realname_admin_module',
    ),
    'type' => MENU_LOCAL_TASK,
    'file' => 'realname.admin.inc',
    'weight' => 4,
  );
  $items['admin/user/realname/bypass'] = array(
    'title' => 'Bypass Forms',
    'access arguments' => array(
      'administer users',
    ),
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'realname_admin_bypass',
    ),
    'type' => MENU_LOCAL_TASK,
    'file' => 'realname.admin.inc',
    'weight' => 6,
  );
  $items['admin/user/realname/recalc'] = array(
    'title' => 'Recalculate names',
    'access arguments' => array(
      'administer users',
    ),
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'realname_rebuild_confirm',
    ),
    'type' => MENU_LOCAL_TASK,
    'file' => 'realname.admin.inc',
    'weight' => 8,
  );

  // Path is not admin/build/views due to menu complications with the wildcards from
  // the generic ajax callback.
  $items['admin/user/realname/ajax/autocomplete/user'] = array(
    'page callback' => 'realname_ajax_autocomplete_user',
    'access callback' => 'user_access',
    'access arguments' => array(
      'access content',
    ),
    'type' => MENU_CALLBACK,
  );

  // Privatemsg intercept for recipient autocomplete.
  if (module_exists('privatemsg')) {
    $items['realname/privatemsg/autocomplete'] = array(
      'title' => 'Realname Privatemsg autocomplete',
      'access callback' => user_access('access private messages'),
      'page callback' => 'realname_privatemsg_autocomplete',
      'type' => MENU_CALLBACK,
    );
  }
  return $items;
}