You are here

function print_menu in Printer, email and PDF versions 5.3

Same name and namespace in other branches
  1. 5.4 print.module \print_menu()
  2. 5 print.module \print_menu()
  3. 5.2 print.module \print_menu()
  4. 6 print.module \print_menu()
  5. 7.2 print.module \print_menu()
  6. 7 print.module \print_menu()
  7. 5.x print.module \print_menu()

Implementation of hook_menu().

File

./print.module, line 61
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-friendly pages'),
      '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/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,
    );
  }
  return $items;
}