You are here

function print_help in Printer, email and PDF versions 7

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

Implements hook_help().

File

./print.module, line 354
Displays Printer-friendly versions of Drupal pages.

Code

function print_help($path, $arg) {
  switch ($path) {
    case 'admin/help#print':

      // Return a line-break version of the module README
      return _filter_autop(file_get_contents(drupal_get_path('module', 'print') . '/README.txt'));
  }
  $print_html_link_pos = variable_get('print_html_link_pos', drupal_json_decode(PRINT_HTML_LINK_POS_DEFAULT));
  if ($path !== 'node/%' && !empty($print_html_link_pos['help'])) {
    static $output = FALSE;
    if ($output === FALSE) {
      $output = TRUE;
      $link = print_insert_link();
      if ($link) {
        return "<span class='print-syslink'>{$link}</span>";
      }
    }
  }
}