function uc_ip2country_menu in IP-based Determination of a Visitor's Country 5
Implementation of hook_menu().
Called when Drupal is building menus. Cache parameter lets module know if Drupal intends to cache menu or not - different results may be returned for either case.
Parameters
$may_cache: TRUE when Drupal is building menus it will cache
Return value
An array with the menu path, callback, and parameters.
File
- ./
uc_ip2country.module, line 95 - Determination of user's Country based on IP
Code
function uc_ip2country_menu($may_cache) {
$items = array();
if ($may_cache) {
$items[] = array(
'path' => 'admin/settings/ip2country',
'title' => t('IP to Country Settings'),
'description' => t('Configure the IP/Country settings'),
'access' => user_access('administer ip2country'),
'callback' => 'drupal_get_form',
'callback arguments' => 'uc_ip2country_admin_settings',
'type' => MENU_NORMAL_ITEM,
);
$items[] = array(
'path' => 'admin/settings/ip2country/update',
'title' => t('Update Database'),
'access' => user_access('administer ip2country'),
'callback' => '_ip2country_update',
'type' => MENU_CALLBACK,
);
$items[] = array(
'path' => 'admin/settings/ip2country/lookup',
'title' => t('Lookup IP Address in Database'),
'access' => user_access('administer ip2country'),
'callback' => '_ip2country_lookup',
'type' => MENU_CALLBACK,
);
}
return $items;
}