contact_menu
- Versions
- 4.6 – 5
contact_menu($may_cache)- 6 – 7
contact_menu()
Implementation of hook_menu().
Code
modules/contact.module, line 42
<?php
function contact_menu($may_cache) {
$items = array();
if ($may_cache) {
$items[] = array('path' => 'admin/contact',
'title' => t('contact form'),
'callback' => 'contact_admin_categories',
'access' => user_access('administer site configuration'),
);
$items[] = array('path' => 'admin/contact/category',
'title' => t('categories'),
'callback' => 'contact_admin_categories',
'access' => user_access('administer site configuration'),
'type' => MENU_DEFAULT_LOCAL_TASK,
);
$items[] = array('path' => 'admin/contact/category/list',
'title' => t('list'),
'callback' => 'contact_admin_categories',
'access' => user_access('administer site configuration'),
'type' => MENU_DEFAULT_LOCAL_TASK,
);
$items[] = array('path' => 'admin/contact/category/add',
'title' => t('add category'),
'callback' => 'contact_admin_edit',
'access' => user_access('administer site configuration'),
'type' => MENU_LOCAL_TASK,
'weight' => 1,
);
$items[] = array('path' => 'admin/contact/category/edit',
'title' => t('edit contact category'),
'callback' => 'contact_admin_edit',
'access' => user_access('administer site configuration'),
'type' => MENU_CALLBACK,
);
$items[] = array('path' => 'admin/contact/category/delete',
'title' => t('delete contact'),
'callback' => 'contact_admin_delete',
'access' => user_access('administer site configuration'),
'type' => MENU_CALLBACK,
);
$items[] = array('path' => 'admin/contact/settings',
'title' => t('settings'),
'callback' => 'contact_admin_settings',
'access' => user_access('administer site configuration'),
'type' => MENU_LOCAL_TASK,
'weight' => 1,
);
$items[] = array('path' => 'contact',
'title' => t('contact'),
'callback' => 'contact_mail_page',
'access' => user_access('access content'),
'type' => MENU_SUGGESTED_ITEM,
);
}
else {
if (arg(0) == 'user' && is_numeric(arg(1))) {
$items[] = array('path' => "user/". arg(1) ."/contact",
'title' => t('contact'),
'callback' => 'contact_mail_user',
'type' => MENU_LOCAL_TASK,
'weight' => 2,
);
}
}
return $items;
}
?>Login or register to post comments 