You are here

function tca_node_ctools_render_alter in Token Content Access 7

Implements hook_ctools_render_alter().

This is done since hook_node_view never gets called if the node is rendered by Ctools.

File

tca_node/tca_node.module, line 100
Main module file for Token Content Access nodes module.

Code

function tca_node_ctools_render_alter($info, $page, $context) {
  if ($page) {
    if (isset($context['handler']) && $context['handler']->task == 'node_view') {
      $node = $context['contexts'][$context['handler']->conf['context']]->data;
      if (node_is_page($node) && !user_access('bypass tca_node')) {
        tca_execute('node', $node);
      }
    }
  }
}