function print_link_alter in Printer, email and PDF versions 5.3
Same name and namespace in other branches
- 5.4 print.module \print_link_alter()
- 5.2 print.module \print_link_alter()
- 6 print.module \print_link_alter()
- 5.x print.module \print_link_alter()
Implementation of hook_link_alter().
File
- ./print.module, line 179 
- Displays Printer-friendly versions of Drupal pages.
Code
function print_link_alter(&$node, &$links) {
  foreach ($links as $module => $link) {
    if (strpos($module, 'book_printer') !== FALSE) {
      $print_html_book_link = variable_get('print_html_book_link', PRINT_HTML_BOOK_LINK_DEFAULT);
      if ($print_html_book_link) {
        $format = theme('print_format_link');
        $format['attributes']['title'] = $link['attributes']['title'];
        $links[$module]['href'] = PRINT_PATH . '/' . $link['href'];
        $links[$module]['attributes'] = $format['attributes'];
      }
    }
  }
}