You are here

function comment_perm_perm in Comment Permissions 5

Same name and namespace in other branches
  1. 6 comment_perm.module \comment_perm_perm()

Implementation of hook_perm().

File

./comment_perm.module, line 81

Code

function comment_perm_perm() {
  $perms = array();
  $types = variable_get('comment_perm_node_types', array());
  if (is_array($types)) {
    foreach ($types as $type => $enabled) {
      if ($enabled && !is_numeric($type)) {
        $perms[] = 'comment on ' . $type . ' content';
      }
    }
  }
  return $perms;
}