You are here

function private_node_operations in Private 7.2

Same name and namespace in other branches
  1. 6 private.module \private_node_operations()
  2. 7 private.module \private_node_operations()

Implements hook_node_operations().

File

./private.module, line 381
A tremendously simple access control module -- it allows users to mark individual nodes as private; users with 'access private content' perms can read these nodes, while others cannot.

Code

function private_node_operations() {
  $operations = array(
    'private_mark_as_private' => array(
      'label' => t('Make private'),
      'callback' => 'private_node_mark',
      'callback arguments' => 1,
    ),
    'private_mark_as_public' => array(
      'label' => t('Make public'),
      'callback' => 'private_node_mark',
      'callback arguments' => 0,
    ),
  );
  return $operations;
}