You are here

function private_link in Private 5

Same name and namespace in other branches
  1. 6 private.module \private_link()

File

./private.module, line 211
This is an example illustrating how to restrict access to nodes based on some criterion associated with the user.

Code

function private_link($type, $node = NULL, $teaser = FALSE) {
  if ($type == 'node' && $node->private) {
    $links['private_icon']['title'] = theme('private_node_link', $node);
    $links['private_icon']['html'] = TRUE;
    return $links;
  }
}