function better_formats_permission

cis7 better_formats.module better_formats_permission()
cle7 better_formats.module better_formats_permission()
elmsmedia7 better_formats.module better_formats_permission()
icor7 better_formats.module better_formats_permission()
meedjum_blog7 better_formats.module better_formats_permission()
mooc7 better_formats.module better_formats_permission()

Implements of hook_perm().

File

sites/all/modules/ulmus/better_formats/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;
}