system_menu
- Versions
- 4.6 – 5
system_menu($may_cache)- 6 – 7
system_menu()
Implementation of hook_menu().
Code
modules/system.module, line 93
<?php
function system_menu($may_cache) {
$items = array();
if ($may_cache) {
$items[] = array('path' => 'system/files', 'title' => t('file download'),
'callback' => 'file_download',
'access' => TRUE,
'type' => MENU_CALLBACK);
$access = user_access('administer site configuration');
$items[] = array('path' => 'admin', 'title' => t('administer'),
'access' => user_access('access administration pages'),
'callback' => 'watchdog_overview',
'weight' => 9);
// Themes:
$items[] = array('path' => 'admin/themes', 'title' => t('themes'),
'callback' => 'system_themes', 'access' => $access);
$items[] = array('path' => 'admin/themes/select', 'title' => t('list'),
'callback' => 'system_themes', 'access' => $access,
'type' => MENU_DEFAULT_LOCAL_TASK, 'weight' => -1);
$items[] = array('path' => 'admin/themes/settings', 'title' => t('configure'),
'callback' => 'system_theme_settings', 'access' => $access,
'type' => MENU_LOCAL_TASK);
// Theme configuration subtabs
$items[] = array('path' => 'admin/themes/settings/global', 'title' => t('global settings'),
'callback' => 'system_theme_settings', 'access' => $access,
'type' => MENU_DEFAULT_LOCAL_TASK, 'weight' => -1);
foreach (list_themes() as $theme) {
if ($theme->status) {
$items[] = array('path' => 'admin/themes/settings/'. $theme->name, 'title' => $theme->name,
'callback' => 'system_theme_settings', 'callback arguments' => array($theme->name), 'access' => $access,
'type' => MENU_LOCAL_TASK);
}
}
// Modules:
$items[] = array('path' => 'admin/settings', 'title' => t('settings'),
'callback' => 'system_site_settings', 'access' => $access);
foreach (module_list() as $name) {
if (module_hook($name, 'settings')) {
$items[] = array('path' => 'admin/settings/'. $name, 'title' => t($name));
}
}
$items[] = array('path' => 'admin/modules', 'title' => t('modules'),
'callback' => 'system_modules', 'access' => $access);
}
return $items;
}
?>Login or register to post comments 