function publishcontent_perm in Publish Content 5
Same name and namespace in other branches
- 5.2 publishcontent.module \publishcontent_perm()
- 6 publishcontent.module \publishcontent_perm()
Implementation of hook_perm().
File
- ./
publishcontent.module, line 48 - Add button to publish or unpublish a node, with access control based on the node type
Code
function publishcontent_perm() {
$perms = array(
'un/publish *all* content',
);
foreach (node_get_types() as $type) {
if ($type->module == 'node') {
$perms[] = 'un/publish ' . check_plain($type->type) . ' content';
}
}
return $perms;
}