You are here

function _print_url_list_enabled in Printer, email and PDF versions 7.2

Same name and namespace in other branches
  1. 5.4 print.pages.inc \_print_url_list_enabled()
  2. 6 print.pages.inc \_print_url_list_enabled()
  3. 7 print.pages.inc \_print_url_list_enabled()
  4. 5.x print.pages.inc \_print_url_list_enabled()

Check URL list settings for this node.

Parameters

Object $node: Node object.

string $format: Format of the page being generated.

Return value

bool TRUE if URL list should be displayed, FALSE otherwise

3 calls to _print_url_list_enabled()
_print_generate_book in ./print.pages.inc
Prepare a Printer-friendly-ready node body for book pages.
_print_generate_node in ./print.pages.inc
Prepare a Printer-friendly-ready node body for content nodes.
_print_generate_path in ./print.pages.inc
Prepare a Printer-friendly-ready node body for non-content pages.

File

./print.pages.inc, line 582

Code

function _print_url_list_enabled($node, $format) {
  if (!isset($node->type)) {
    $node_urllist = variable_get('print_' . $format . '_display_sys_urllist', PRINT_TYPE_SYS_URLLIST_DEFAULT);
  }
  else {
    $node_urllist = isset($node->{'print_' . $format . '_display_urllist'}) ? $node->{'print_' . $format . '_display_urllist'} : variable_get('print_' . $format . '_display_urllist_' . $node->type, PRINT_TYPE_URLLIST_DEFAULT);
  }

  // Get value of Printer-friendly URLs setting.
  return variable_get('print_urls', PRINT_URLS_DEFAULT) && $node_urllist;
}