You are here

function print_pdf_link_allowed in Printer, email and PDF versions 7.2

Same name and namespace in other branches
  1. 5.4 print_pdf/print_pdf.module \print_pdf_link_allowed()
  2. 5.3 print_pdf/print_pdf.module \print_pdf_link_allowed()
  3. 6 print_pdf/print_pdf.module \print_pdf_link_allowed()
  4. 7 print_pdf/print_pdf.module \print_pdf_link_allowed()
  5. 5.x print_pdf/print_pdf.module \print_pdf_link_allowed()

Check if the link to the PDF version is allowed depending on the settings.

Parameters

array $args: Array containing the possible parameters: view_mode, node, type, path.

Return value

bool FALSE if not allowed, TRUE otherwise

File

print_pdf/print_pdf.module, line 351
Displays Printer-friendly versions of Drupal pages.

Code

function print_pdf_link_allowed($args) {
  $print_pdf_pdf_tool = variable_get('print_pdf_pdf_tool', PRINT_PDF_PDF_TOOL_DEFAULT);
  return user_access('access PDF version') && !empty($print_pdf_pdf_tool);
}