You are here

function print_node_insert in Printer, email and PDF versions 7

Implements hook_node_insert().

File

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

Code

function print_node_insert($node) {
  if (user_access('administer print') || user_access('node-specific print configuration')) {
    if (!isset($node->print_display)) {
      $node->print_display = variable_get('print_display_' . $node->type, PRINT_TYPE_SHOW_LINK_DEFAULT);
    }
    if (!isset($node->print_display_comment)) {
      $node->print_display_comment = variable_get('print_display_comment_' . $node->type, PRINT_TYPE_COMMENT_LINK_DEFAULT);
    }
    if (!isset($node->print_display_urllist)) {
      $node->print_display_urllist = variable_get('print_display_urllist_' . $node->type, PRINT_TYPE_URLLIST_DEFAULT);
    }
    _print_node_conf_modify($node->nid, $node->print_display, $node->print_display_comment, $node->print_display_urllist);
  }
}