function ds_show_field in Display Suite 6.3
Same name and namespace in other branches
- 6 ds.module \ds_show_field()
- 6.2 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.:
1 call to ds_show_field()
- nd_views_node_helper in modules/
nd/ nd.module - Helper function for views node plugin.
File
- ./
ds.module, line 770
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];
}