function hook_content_lock_form_id_blacklist_alter in Content locking (anti-concurrent editing) 7
Same name and namespace in other branches
- 6.2 content_lock.api.inc \hook_content_lock_form_id_blacklist_alter()
- 7.3 content_lock.api.php \hook_content_lock_form_id_blacklist_alter()
- 7.2 content_lock.api.php \hook_content_lock_form_id_blacklist_alter()
Alter the blacklist of form_ids.
Locking nodes referenced from certain form_ids, such as comment forms and the like, can supposedly be enabled or disabled here.
Parameters
$blacklist: An array of blacklisted form_ids. Set $blacklist[<form_id>] = TRUE to blacklist <form_id> or unset($blacklist[<form_id>]) to unblacklist a form. Note that locking is not likely to work for every type of node form.
$node: If available, the node being currently checked shalled be passed in. This may be useful for form_ids based on the nid of a node which certain modules might do with the help of hook_forms().
Related topics
1 invocation of hook_content_lock_form_id_blacklist_alter()
File
- ./
content_lock.api.inc, line 83 - Document content_lock hooks.
Code
function hook_content_lock_form_id_blacklist_alter(&$blacklist, $node = NULL) {
/*
* Disable locking an arbitrary form which happens to set
* $form['nid'] and $form['#node'] to point to a node.
*/
$blacklist['arbitrary_form'] = TRUE;
}