You are here

function internal_nodes_preprocess_node in Internal Nodes 7

Process variables for node.tpl.php

File

./internal_nodes.module, line 445
Internal nodes

Code

function internal_nodes_preprocess_node(&$variables) {
  $node = $variables['node'];
  if (isset($node->internal_nodes)) {
    $action = $node->internal_nodes['action'];

    // If node would be denied, assuming user has access.
    if ($action != INTERNAL_NODES_FOUND) {

      // Apply class showing node would be denied
      $variables['classes_array'][] = 'internal-node';
    }
  }
}