You are here

function protected_node_protected_node_hide in Protected Node 6

Same name and namespace in other branches
  1. 7 protected_node.module \protected_node_protected_node_hide()
  2. 1.0.x protected_node.module \protected_node_protected_node_hide()

Implementation of hook_protected_node_hide().

We implement this callback since it makes sense (I think) although it makes the module a bit slower.

This function hides the body & teaser, and if requested on that node we hide the title as well.

@param[in,out] $node The affected node.

File

./protected_node.module, line 542

Code

function protected_node_protected_node_hide(&$node) {

  // Core module fields
  if (!$node->protected_node_show_title) {
    $node->title = t('Password protected page');
  }
  $node->teaser = '';
  $node->body = '';
  $node->content = array();
}