You are here

function publication_date_list_permissions in Publication Date 7.2

Helper function to generate permission each content type.

Parameters

string $type: The machine-readable name of the node type.

Return value

array An array of permission names and description.

1 call to publication_date_list_permissions()
publication_date_permission in ./publication_date.module
Implements hook_permission().

File

./publication_date.module, line 280
Add a field to nodes containing the publication date.

Code

function publication_date_list_permissions($type) {
  $name = node_type_get_name($type);
  $type = check_plain($type);
  $permissions = array(
    "set {$type} published on date" => array(
      'title' => t('Modify %type_name "Published On" date.', array(
        '%type_name' => $name,
      )),
      'description' => t('Change the "Published On" date for this content type.'),
    ),
  );
  return $permissions;
}