You are here

function custom_pub_perm in Custom Publishing Options 6

Implements hook_perm().

We use these permissions on the individual elements in the node_form via the #access parameter. So in order to use the elements you must add the permissions to a role.

File

./custom_pub.module, line 26
Adds the ability to add Custom publishing options to the node Add/Edit form.

Code

function custom_pub_perm() {
  $types = variable_get('custom_pub_types', array());
  foreach ($types as $type) {
    $perms[] = 'toggle ' . $type['type'] . ' custom options';
  }
  return $perms;
}