function gotwo_menu in Go - url redirects 5
Same name and namespace in other branches
- 6 gotwo.module \gotwo_menu()
- 7 gotwo.module \gotwo_menu()
Implementation of hook_menu
File
- ./
gotwo.module, line 52 - Module that provides easy to use redirection links. A redirection link would be like: http://examples.org/go/a_label http://examples.org/go/123546 http://examples.org/go/or/like/this
Code
function gotwo_menu($may_cache) {
$items = array();
if ($may_cache) {
$items[] = array(
'path' => 'go',
'callback' => '__gotwo_do_redir',
'access' => TRUE,
'type' => MENU_CALLBACK,
);
$items[] = array(
'title' => t('Go redirects'),
'path' => 'admin/build/gotwo',
'callback' => '__gotwo_list',
'access' => user_access('view gotwo entries'),
);
$items[] = array(
'path' => 'admin/settings/gotwo',
'title' => t('Gotwo Settings'),
'description' => t('Configure URL parameters and disclaimer options'),
'callback' => 'drupal_get_form',
'callback arguments' => array(
'gotwo_admin_settings',
),
'access' => user_access('administer gotwo'),
);
$items[] = array(
'title' => t('List'),
'path' => 'admin/build/gotwo/list',
'type' => MENU_DEFAULT_LOCAL_TASK,
'access' => user_access('view gotwo entries'),
);
}
else {
$items[] = array(
'title' => t('Add'),
'path' => 'admin/build/gotwo/add',
'callback' => 'drupal_get_form',
'callback arguments' => array(
'__gotwo_manual_add',
),
'type' => MENU_LOCAL_TASK,
'access' => user_access('edit gotwo entries'),
);
$items[] = array(
'path' => 'admin/build/gotwo/reset',
'title' => t('Reset'),
'callback' => 'drupal_get_form',
'callback arguments' => array(
'gotwo_reset_confirm',
),
'access' => user_access('edit gotwo entries'),
'type' => MENU_CALLBACK,
);
$items[] = array(
'path' => 'admin/build/gotwo/delete',
'callback' => '__gotwo_delete_page',
'access' => user_access('edit gotwo entries'),
'type' => MENU_CALLBACK,
);
}
return $items;
}