function avatar_selection_menu in Avatar Selection 7
Same name and namespace in other branches
- 5.2 avatar_selection.module \avatar_selection_menu()
- 5 avatar_selection.module \avatar_selection_menu()
- 6 avatar_selection.module \avatar_selection_menu()
Implements hook_menu().
File
- ./
avatar_selection.module, line 79 - The Avatar Selection module allows the user to pick an avatar image from a list already loaded by an administrative user, and to the administrator to disable uploading other avatar files by the user.
Code
function avatar_selection_menu() {
$items = array();
$items['admin/config/people/avatar_selection'] = array(
'title' => 'Avatar Selection',
'description' => 'Allows the user to upload and delete avatars.',
'file' => 'avatar_selection.admin.inc',
'page callback' => 'avatar_selection_settings_page',
'access callback' => 'user_access',
'access arguments' => array(
'administer avatar selection',
),
);
$items['admin/config/people/avatar_selection/config'] = array(
'title' => 'Configure',
'description' => 'Allows the user to configure avatar settings.',
'file' => 'avatar_selection.admin.inc',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'avatar_selection_config_form',
),
'access callback' => 'user_access',
'access arguments' => array(
'administer avatar selection',
),
'type' => MENU_DEFAULT_LOCAL_TASK,
'weight' => -10,
);
$items['admin/config/people/avatar_selection/upload'] = array(
'title' => 'Upload',
'description' => 'Allows the user to upload avatars.',
'file' => 'avatar_selection.admin.inc',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'avatar_selection_upload_form',
),
'access callback' => 'user_access',
'access arguments' => array(
'administer avatar selection',
),
'type' => MENU_LOCAL_TASK,
'weight' => -9,
);
$items['admin/config/people/avatar_selection/edit'] = array(
'title' => 'Manage avatars',
'description' => 'Allows the user to modify or delete an avatar from a list.',
'file' => 'avatar_selection.admin.inc',
'page callback' => 'avatar_selection_roles_page',
'access callback' => 'user_access',
'access arguments' => array(
'administer avatar selection',
),
'type' => MENU_LOCAL_TASK,
);
$items['admin/config/people/avatar_selection/edit/role/%'] = array(
'title' => 'Manage avatars',
'description' => 'Allows the user to modify or delete an avatar from a list.',
'file' => 'avatar_selection.admin.inc',
'page callback' => 'avatar_selection_roles_page',
'page arguments' => array(
'op' => 'role',
),
'access callback' => 'user_access',
'access arguments' => array(
'administer avatar selection',
),
);
if (module_exists('og')) {
$items['admin/config/people/avatar_selection/edit/og/%'] = array(
'title' => 'Manage avatars',
'description' => 'Allows the user to modify or delete an avatar from a list.',
'file' => 'avatar_selection.admin.inc',
'page callback' => 'avatar_selection_roles_page',
'page arguments' => array(
'op' => 'og',
),
'access callback' => 'user_access',
'access arguments' => array(
'administer avatar selection',
),
);
}
return $items;
}