You are here

function better_formats_permission in Better Formats 7

Implements of hook_perm().

File

./better_formats.module, line 10
Enhances Drupal's core text format settings.

Code

function better_formats_permission() {
  $entities = entity_get_info();
  $perms = array(
    'show format tips' => array(
      'title' => t('Show format tips'),
      'description' => t('Toggle display of format description help.'),
    ),
    'show more format tips link' => array(
      'title' => t('Show more format tips link'),
      'description' => t('Toggle display of the "More information about text formats" link.'),
    ),
  );
  foreach ($entities as $type => $info) {
    if ($info['fieldable']) {
      $perms['show format selection for ' . $type] = array(
        'title' => t('Show format selection for @entitys', array(
          '@entity' => $type,
        )),
      );
    }
  }
  return $perms;
}