You are here

function print_menu in Printer, email and PDF versions 7.2

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. 5.3 print.module \print_menu()
  5. 6 print.module \print_menu()
  6. 7 print.module \print_menu()
  7. 5.x print.module \print_menu()

Implements hook_menu().

File

./print.module, line 141
Displays Printer-friendly versions of Drupal pages.

Code

function print_menu() {
  $link = print_print_link();
  $items = array();
  $items[$link['path']] = array(
    'title' => 'Printer-friendly',
    'page callback' => 'print_controller_html',
    'access arguments' => array(
      'access print',
    ),
    'type' => MENU_CALLBACK,
    'file' => 'print.pages.inc',
  );
  $items[$link['path'] . '/' . $link['path']] = array(
    'access callback' => FALSE,
  );
  $items['admin/config/user-interface/print'] = array(
    'title' => 'Printer, email and PDF versions',
    'description' => 'Adds a printer-friendly version link to content and administrative pages.',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'print_html_settings',
    ),
    'access arguments' => array(
      'administer print',
    ),
    'file' => 'print.admin.inc',
  );
  $items['admin/config/user-interface/print/html'] = array(
    'title' => 'Web page',
    'weight' => 1,
    'type' => MENU_DEFAULT_LOCAL_TASK,
  );
  $items['admin/config/user-interface/print/common'] = array(
    'title' => 'Settings',
    'description' => 'Settings for the common functionalities for all the print sub-modules.',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'print_main_settings',
    ),
    'access arguments' => array(
      'administer print',
    ),
    'weight' => 10,
    'type' => MENU_LOCAL_TASK,
    'file' => 'print.admin.inc',
  );
  return $items;
}