function nopremium_permission in Node Option Premium 7
Implementation of hook_permission().
File
- ./
nopremium.module, line 194 - Written by Henri MEDOT <henri.medot[AT]absyx[DOT]fr> http://www.absyx.fr
Code
function nopremium_permission() {
$perms['view full premium content of any type'] = array(
'title' => t('View full premium content of any type'),
);
$perms['override premium option of any content type'] = array(
'title' => t('Override premium option of any content type'),
);
foreach (node_type_get_types() as $type => $info) {
$perms['view full ' . $type . ' premium content'] = array(
'title' => t('%type_name: View full premium content', array(
'%type_name' => $info->name,
)),
);
$perms['override ' . $type . ' premium option'] = array(
'title' => t('%type_name: Override premium option', array(
'%type_name' => $info->name,
)),
);
}
return $perms;
}