You are here

function addtoany_perm in AddToAny Share Buttons 5

Same name and namespace in other branches
  1. 5.2 addtoany.module \addtoany_perm()
  2. 6.3 addtoany.module \addtoany_perm()
  3. 6 addtoany.module \addtoany_perm()
  4. 6.2 addtoany.module \addtoany_perm()

File

./addtoany.module, line 4

Code

function addtoany_perm() {

  //$perms = array('administer content types', 'administer nodes', 'access content', 'view revisions', 'revert revisions');
  foreach (node_get_types() as $type) {
    $name = check_plain($type->type);
    $perms[] = 'share ' . $name . ' content';
  }
  return $perms;
}