function content_theme_permission in Content Theme 7
Same name and namespace in other branches
- 7.2 content_theme.module \content_theme_permission()
Implements hook_permission().
File
- ./
content_theme.module, line 41 - This module allows to use different themes than the site default on content creating, editing, and viewing pages.
Code
function content_theme_permission() {
$perm = array();
$perm['administer content theme'] = array(
'title' => t('Administer content theme settings'),
);
foreach (node_type_get_types() as $type => $value) {
$info = node_type_get_type($type);
$perm["select {$type} content editing theme"] = array(
'title' => t('%type_name: Select content editing theme', array(
'%type_name' => $info->name,
)),
);
$perm["select {$type} content viewing theme"] = array(
'title' => t('%type_name: Select content viewing theme', array(
'%type_name' => $info->name,
)),
);
}
return $perm;
}