function ds_extras_permission in Display Suite 7
Same name and namespace in other branches
- 7.2 modules/ds_extras/ds_extras.module \ds_extras_permission()
Implements hook_permission().
File
- modules/
ds_extras/ ds_extras.module, line 146 - Display Suite extras main functions.
Code
function ds_extras_permission() {
$permissions = array();
// Extra check to make sure this doesn't get fired on install.
if (variable_get('ds_extras_switch_view_mode', FALSE)) {
$permissions = array();
foreach (node_type_get_names() as $key => $name) {
$permissions['ds_switch ' . $key] = array(
'title' => t('Switch view modes on :type', array(
':type' => $name,
)),
);
}
}
return $permissions;
}