function print_pdf_node_insert in Printer, email and PDF versions 7
Same name and namespace in other branches
- 7.2 print_pdf/print_pdf.module \print_pdf_node_insert()
Implements hook_node_insert().
File
- print_pdf/
print_pdf.module, line 398 - Displays Printer-friendly versions of Drupal pages.
Code
function print_pdf_node_insert($node) {
if (user_access('administer print') || user_access('node-specific print configuration')) {
if (!isset($node->print_pdf_display)) {
$node->print_pdf_display = variable_get('print_pdf_display_' . $node->type, PRINT_TYPE_SHOW_LINK_DEFAULT);
}
if (!isset($node->print_pdf_display_comment)) {
$node->print_pdf_display_comment = variable_get('print_pdf_display_comment_' . $node->type, PRINT_TYPE_COMMENT_LINK_DEFAULT);
}
if (!isset($node->print_pdf_display_urllist)) {
$node->print_pdf_display_urllist = variable_get('print_pdf_display_urllist_' . $node->type, PRINT_TYPE_URLLIST_DEFAULT);
}
_print_pdf_node_conf_modify($node->nid, $node->print_pdf_display, $node->print_pdf_display_comment, $node->print_pdf_display_urllist);
}
}