address_menu($may_cache)
ecommerce-5--4/address/address.module, line 166
Implementation of menu_hook()
<?php
function address_menu($may_cache) {
global $user;
$uid = $user->uid;
$items = array();
if ($may_cache) {
array_push($items, array(
'access' => true,
'callback' => 'address_autocomplete',
'path' => 'address/autocomplete',
'type' => MENU_CALLBACK
));
array_push($items, array(
'callback' => 'drupal_get_form',
'callback arguments' => 'address_admin',
'path' => 'admin/ecsettings/ctype/address',
'title' => 'Address',
'type' => MENU_CALLBACK,
));
}
else {
if (arg(0) == 'user') {
if (user_access('administer users')) {
$uid = arg(1);
}
if (!empty($uid)) {
array_push($items, array(
'path' => "user/$uid/address",
'title' => t('Address Book'),
'callback' => 'address_page',
'access' => true,
'type' => MENU_LOCAL_TASK,
'weight' => 1,
));
}
}
}
return $items;
}
?>