function _views_data_export_header_shared_preprocess in Views data export 7.3
Same name and namespace in other branches
- 6.3 theme/views_data_export.theme.inc \_views_data_export_header_shared_preprocess()
- 6 theme/views_data_export.theme.inc \_views_data_export_header_shared_preprocess()
- 6.2 theme/views_data_export.theme.inc \_views_data_export_header_shared_preprocess()
- 7.4 theme/views_data_export.theme.inc \_views_data_export_header_shared_preprocess()
- 7 theme/views_data_export.theme.inc \_views_data_export_header_shared_preprocess()
Shared helper function for export preprocess functions.
5 calls to _views_data_export_header_shared_preprocess()
- template_preprocess_views_data_export_csv_header in theme/
views_data_export.theme.inc - template_preprocess_views_data_export_msoffice_body in theme/
views_data_export.theme.inc - template_preprocess_views_data_export_msoffice_header in theme/
views_data_export.theme.inc - template_preprocess_views_data_export_txt_body in theme/
views_data_export.theme.inc - Preprocess txt output template.
- template_preprocess_views_data_export_xml_body in theme/
views_data_export.theme.inc - Preprocess xml output template.
File
- theme/
views_data_export.theme.inc, line 505 - Theme related functions for processing our output style plugins.
Code
function _views_data_export_header_shared_preprocess(&$vars) {
$view = $vars['view'];
$fields =& $view->field;
$fields_info = $view->display_handler
->get_option('fields');
$vars['header'] = array();
foreach ($fields as $key => $field) {
if (empty($field->options['exclude'])) {
if (isset($fields_info) && isset($fields_info[$key]['label'])) {
$vars['header'][$key] = check_plain($fields_info[$key]['label']);
}
else {
$vars['header'][$key] = check_plain($field
->label());
}
}
}
}