You are here

function hook_link_allowed in Printer, email and PDF versions 7.2

Checks if the link is allowed according to the appropriate sub-module.

Normally checks if the user holds the required access permission, but can be used for extra checks, such as the proper module configuration, etc.

Parameters

array $args: An associative array containing:

  • path: path to the non-node page being displayed.
  • node: path to the node beign displayed.
  • view_mode: current view mode of the node being displayed.
  • type: 'node' or 'comment'.

Return value

bool FALSE if not allowed, TRUE otherwise

Related topics

5 functions implement hook_link_allowed()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

print_epub_link_allowed in print_epub/print_epub.module
Check if the link to the EPUB version is allowed depending on the settings.
print_link_allowed in ./print.module
Check if the link to the PF version is allowed depending on the settings.
print_mail_link_allowed in print_mail/print_mail.module
Check if the link to send by email is allowed depending on the settings.
print_pdf_link_allowed in print_pdf/print_pdf.module
Check if the link to the PDF version is allowed depending on the settings.
print_ui_link_allowed in print_ui/print_ui.module
Check if the link to the PF version is allowed depending on the settings.

File

print_ui/print_ui.api.php, line 74
Hooks provided by the Print UI module.

Code

function hook_link_allowed($args) {
  return user_access('access foo');
}