function hook_content_lock_node_type_blacklist_alter in Content locking (anti-concurrent editing) 7.3
Same name and namespace in other branches
- 6.2 content_lock.api.inc \hook_content_lock_node_type_blacklist_alter()
- 7 content_lock.api.inc \hook_content_lock_node_type_blacklist_alter()
- 7.2 content_lock.api.php \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()
File
- ./
content_lock.api.php, line 159 - 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;
}