function ds_panels_display_settings in Display Suite 7
Form callback: Show custom display settings.
1 string reference to 'ds_panels_display_settings'
- ds_panels_field_ui in modules/
ds_extras/ ds_extras.panels.inc - Manage display screen with panels editor.
File
- modules/
ds_extras/ ds_extras.panels.inc, line 139 - Administrative functions for DS panels.
Code
function ds_panels_display_settings($form, $form_state, $entity_type, $bundle) {
$form['#entity_type'] = $entity_type;
$form['#bundle'] = $bundle;
$view_mode_admin_access = user_access('admin_view_modes');
$view_modes = ds_panels_get_enabled_view_modes($entity_type, $bundle);
if (!empty($view_modes)) {
$form['view_modes_custom'] = array(
'#type' => 'checkboxes',
'#title' => t('Use custom display settings for the following view modes'),
'#options' => $view_modes['options'],
'#default_value' => $view_modes['default'],
'#description' => $view_mode_admin_access ? l(t('Manage view modes'), 'admin/structure/ds/view_modes') : '',
);
$form['modes_save'] = array(
'#type' => 'submit',
'#value' => t('Save'),
'#submit' => array(
'ds_panels_display_settings_save',
),
);
return $form;
}
}