You are here

function unpublished_404_node_page_view in Unpublished 404 7

Page callback. A page callback for all individual node pages.

Parameters

object $node: A node object that is being viewed.

1 string reference to 'unpublished_404_node_page_view'
unpublished_404_menu_alter in ./unpublished_404.module
Implements hook_menu_alter().

File

./unpublished_404.module, line 42
Code for the unpublished 404.

Code

function unpublished_404_node_page_view($node) {
  $node_content = '';
  if (!node_access('view', $node)) {
    if ($node->status != NODE_PUBLISHED) {
      $node_content = MENU_NOT_FOUND;
    }
    else {
      $node_content = MENU_ACCESS_DENIED;
    }
  }
  elseif (module_exists('ds_extras') && function_exists('ds_extras_node_page_view')) {
    $node_content = ds_extras_node_page_view($node);
  }
  else {
    $node_content = node_page_view($node);
  }
  return $node_content;
}