You are here

function hook_content_lock_node_type_blacklist_alter in Content locking (anti-concurrent editing) 7.2

Same name and namespace in other branches
  1. 6.2 content_lock.api.inc \hook_content_lock_node_type_blacklist_alter()
  2. 7.3 content_lock.api.php \hook_content_lock_node_type_blacklist_alter()
  3. 7 content_lock.api.inc \hook_content_lock_node_type_blacklist_alter()

Alter the node type blacklist.

Use this hook to disable locking for particular node types.

Parameters

array $blacklist: An array with keys being node types (such as 'page') and the values being TRUE if that node type is for a node which shouldn't ever be locked.

object $node: The node currently being tested for locking eligibility. This enables the hook to directly test the node's type for eligibility (and ban it by adding the type to the $blacklist).

Related topics

1 invocation of hook_content_lock_node_type_blacklist_alter()
content_lock_content_lock_node_lockable in ./content_lock.module
Our own hook_content_lock_node_lockable().

File

./content_lock.api.php, line 138
Document content_lock hooks.

Code

function hook_content_lock_node_type_blacklist_alter(&$blacklist, $node) {

  /*
   * Don't lock a custom node type which is only ever editable by its
   * author.
   */
  $blacklist['custom_oneuser_nodetype'] = TRUE;
}