function print_pdf_insert_link in Printer, email and PDF versions 7.2
Same name and namespace in other branches
- 5.4 print_pdf/print_pdf.module \print_pdf_insert_link()
- 5.3 print_pdf/print_pdf.module \print_pdf_insert_link()
- 6 print_pdf/print_pdf.module \print_pdf_insert_link()
- 7 print_pdf/print_pdf.module \print_pdf_insert_link()
- 5.x print_pdf/print_pdf.module \print_pdf_insert_link()
Auxiliary function to display a formatted PDF version link.
Function made available so that developers may call this function from their defined pages/blocks.
Parameters
string $path: Path to be used in the link. If not specified, the current URL is used.
object $node: Node object, to be used in checking node access. If the path argument is not provided, the path used will be node/nid.
string $location: Where in the page where the link is being inserted ('link', 'corner', 'block', 'help').
Return value
bool string with the HTML link to the printer-friendly page
Related topics
File
- print_pdf/
print_pdf.module, line 328 - Displays Printer-friendly versions of Drupal pages.
Code
function print_pdf_insert_link($path = NULL, $node = NULL, $location = '') {
if (function_exists('print_ui_insert_link')) {
return print_ui_insert_link(print_pdf_print_link(), array(
'path' => $path,
'node' => $node,
'location' => $location,
));
}
else {
return FALSE;
}
}