You are here

function avatar_selection_menu in Avatar Selection 5

Same name and namespace in other branches
  1. 5.2 avatar_selection.module \avatar_selection_menu()
  2. 6 avatar_selection.module \avatar_selection_menu()
  3. 7 avatar_selection.module \avatar_selection_menu()

Implementation of hook_menu().

File

./avatar_selection.module, line 48

Code

function avatar_selection_menu($may_cache) {
  $access = user_access('administer avatar selection');
  $items = array();
  if ($may_cache) {
    $items[] = array(
      'path' => 'admin/settings/avatar_selection',
      'title' => t('Avatar Selection'),
      'callback' => 'avatar_selection_settings_page',
      'access' => $access,
      'description' => t('Allows the user to upload and delete avatars.'),
    );
    $items[] = array(
      'path' => 'admin/settings/avatar_selection/config',
      'title' => t('Configure'),
      'description' => t('Allows the user to configure avatar settings.'),
      'callback' => 'drupal_get_form',
      'callback arguments' => array(
        'avatar_selection_config_form',
      ),
      'access' => $access,
      'type' => MENU_DEFAULT_LOCAL_TASK,
      'weight' => -10,
    );
    $items[] = array(
      'path' => 'admin/settings/avatar_selection/images',
      'title' => t('Upload'),
      'description' => t('Allows the user to upload avatars.'),
      'callback' => 'drupal_get_form',
      'callback arguments' => array(
        'avatar_selection_images_form',
      ),
      'access' => $access,
      'type' => MENU_LOCAL_TASK,
      'weight' => -9,
    );
    $items[] = array(
      'path' => 'admin/settings/avatar_selection/edit',
      'title' => t('Manage avatars'),
      'description' => t('Allows the user to modify or delete an avatar from a list.'),
      'callback' => 'drupal_get_form',
      'callback arguments' => array(
        'avatar_selection_edit_form',
      ),
      'access' => $access,
      'type' => MENU_LOCAL_TASK,
    );
  }
  return $items;
}