function scs_view_mode_options in Simplenews Content Selection 8
Same name and namespace in other branches
- 7.2 scs.module \scs_view_mode_options()
Put together a option list based on selected view modes
1 call to scs_view_mode_options()
- scs_node_sort_form in ./
scs.module - Form callback: second step of the selection form, sorting nodes
File
- ./
scs.module, line 181 - General hooks and commonly-used functions
Code
function scs_view_mode_options() {
$entity_info = entity_get_info();
$view_modes = array_filter(variable_get('scs_view_mode', array(
'scs' => 1,
)));
$options = array();
foreach ($view_modes as $machine_name => $status) {
if ($status) {
$options[$machine_name] = $entity_info['node']['view modes'][$machine_name]['label'];
}
}
return $options;
}