function ds_show_field in Display Suite 6.2
Same name and namespace in other branches
- 6.3 ds.module \ds_show_field()
- 6 ds.module \ds_show_field()
Function to check if a field is set for a type and build mode.
Parameters
string $module The module to get the settings for.:
string $type_name The name of the object type.:
string $build_mode The key of the build mode.:
string $field The name of the field to check for.:
File
- ./
ds.module, line 1334 - Core functions for the Display Suite module.
Code
function ds_show_field($module, $type_name, $build_mode, $field) {
static $show_fields = array();
if (!isset($show_fields[$module][$type_name][$build_mode][$field])) {
$display_settings = ds_get_settings($module, $type_name, $build_mode);
$show_fields[$module][$type_name][$build_mode][$field] = isset($display_settings['fields'][$field]) && $display_settings['fields'][$field]['region'] != 'disabled' ? TRUE : FALSE;
}
return $show_fields[$module][$type_name][$build_mode][$field];
}