function flag_menu in Flag 5
Same name and namespace in other branches
- 6.2 flag.module \flag_menu()
- 6 flag.module \flag_menu()
- 7.3 flag.module \flag_menu()
- 7.2 flag.module \flag_menu()
Implementation of hook_menu().
File
- ./
flag.module, line 11 - The Flag module.
Code
function flag_menu($may_cache) {
$items = array();
if ($may_cache) {
$items[] = array(
'path' => 'admin/build/flags',
'title' => t('Flags'),
'callback' => 'flag_admin',
'callback arguments' => array(
'flag_admin_page',
),
'access' => user_access('administer flags'),
'description' => t('Configure flags for marking content with arbitary information (such as <em>offensive</em> or <em>bookmarked</em>).'),
'type' => MENU_NORMAL_ITEM,
);
$items[] = array(
'path' => 'admin/build/flags/edit',
'title' => t('Edit flags'),
'callback' => 'flag_admin',
'callback arguments' => array(
'drupal_get_form',
'flag_form',
),
'access' => user_access('administer flags'),
'type' => MENU_CALLBACK,
);
$items[] = array(
'path' => 'admin/build/flags/delete',
'title' => t('Delete flags'),
'callback' => 'flag_admin',
'callback arguments' => array(
'drupal_get_form',
'flag_delete_confirm',
),
'access' => user_access('administer flags'),
'type' => MENU_CALLBACK,
);
$items[] = array(
'path' => 'admin/build/flags/list',
'title' => t('List'),
'callback' => 'flag_admin',
'callback arguments' => array(
'flag_admin_page',
),
'access' => user_access('administer flags'),
'type' => MENU_DEFAULT_LOCAL_TASK,
'weight' => -1,
);
$items[] = array(
'path' => 'admin/build/flags/add',
'title' => t('Add'),
'callback' => 'flag_admin',
'callback arguments' => array(
'flag_add_page',
),
'access' => user_access('administer flags'),
'type' => MENU_LOCAL_TASK,
);
$items[] = array(
'path' => 'flag',
'title' => t('Flag'),
'callback' => 'flag_page',
'access' => user_access('access content'),
'type' => MENU_CALLBACK,
);
$items[] = array(
'path' => 'flag/confirm',
'title' => t('Flag confirm'),
'callback' => 'drupal_get_form',
'callback arguments' => array(
'flag_confirm',
),
'access' => user_access('access content'),
'type' => MENU_CALLBACK,
);
}
return $items;
}