function print_menu in Printer, email and PDF versions 5.4
Same name and namespace in other branches
- 5 print.module \print_menu()
- 5.2 print.module \print_menu()
- 5.3 print.module \print_menu()
- 6 print.module \print_menu()
- 7.2 print.module \print_menu()
- 7 print.module \print_menu()
- 5.x print.module \print_menu()
Implementation of hook_menu().
File
- ./
print.module, line 96 - Displays Printer-friendly versions of Drupal pages.
Code
function print_menu($may_cache) {
$items = array();
if ($may_cache) {
$items[] = array(
'path' => PRINT_PATH,
'title' => t('Printer-friendly'),
'callback' => 'print_controller_html',
'access' => user_access('access print'),
'type' => MENU_CALLBACK,
);
$items[] = array(
'path' => 'admin/settings/print',
'title' => t('Printer, e-mail and PDF versions'),
'description' => t('Adds a printer-friendly version link to content and administrative pages.'),
'callback' => 'drupal_get_form',
'callback arguments' => array(
'print_html_settings',
),
'access' => user_access('administer print'),
);
$items[] = array(
'path' => 'admin/settings/print/html',
'title' => t('Web page'),
'weight' => 1,
'type' => MENU_DEFAULT_LOCAL_TASK,
);
$items[] = array(
'path' => 'admin/settings/print/html/options',
'title' => t('Options'),
'weight' => 1,
'type' => MENU_DEFAULT_LOCAL_TASK,
);
$items[] = array(
'path' => 'admin/settings/print/html/strings',
'title' => t('Text strings'),
'callback' => 'drupal_get_form',
'callback arguments' => array(
'print_html_strings_settings',
),
'access' => user_access('administer print'),
'weight' => 2,
'type' => MENU_LOCAL_TASK,
);
$items[] = array(
'path' => 'admin/settings/print/common',
'title' => t('Settings'),
'callback' => 'drupal_get_form',
'callback arguments' => array(
'print_main_settings',
),
'access' => user_access('administer print'),
'weight' => 10,
'type' => MENU_LOCAL_TASK,
);
$items[] = array(
'path' => 'admin/settings/print/common/options',
'title' => t('Options'),
'weight' => 1,
'type' => MENU_DEFAULT_LOCAL_TASK,
);
$items[] = array(
'path' => 'admin/settings/print/common/strings',
'title' => t('Text strings'),
'callback' => 'drupal_get_form',
'callback arguments' => array(
'print_main_strings_settings',
),
'access' => user_access('administer print'),
'weight' => 2,
'type' => MENU_LOCAL_TASK,
);
}
return $items;
}