You are here

function print_link_alter in Printer, email and PDF versions 5.2

Same name and namespace in other branches
  1. 5.4 print.module \print_link_alter()
  2. 5.3 print.module \print_link_alter()
  3. 6 print.module \print_link_alter()
  4. 5.x print.module \print_link_alter()

Implementation of hook_link_alter().

File

./print.module, line 81
Display printer-friendly versions of Drupal pages

Code

function print_link_alter(&$node, &$links) {
  $print_settings = variable_get('print_settings', print_settings_default());
  if ($print_settings['book_link']) {
    $link =& $links['book_printer'];
    $format = print_format_link();
    $format['attributes']['title'] = $link['attributes']['title'];
    $link['href'] = PRINT_PATH . "/" . $link['href'];
    $link['attributes'] = $format['attributes'];
  }
}