function oa_core_preprocess_views_view_fields in Open Atrium Core 7.2
Implements hook_preprocess_views_view_fields().
Perform field-level replacement/processing here.
2 string references to 'oa_core_preprocess_views_view_fields'
- oa_news_theme in modules/
oa_news/ oa_news.module - Implements hook_theme()
- oa_river_theme in modules/
oa_river/ oa_river.module - Implements hook_theme()
File
- ./
oa_core.module, line 768
Code
function oa_core_preprocess_views_view_fields(&$vars) {
$vars['index'] = $vars['view']->row_index;
$vars['display'] = $vars['view']->current_display;
$vars['count'] = count($vars['view']->result);
foreach ($vars['fields'] as $id => $field) {
$vars[$id] = $field->content;
switch ($id) {
case 'timestamp':
$vars[$id . '_raw'] = $field->raw;
break;
// Views for these fields are: oa_comment_topics, oa_comment_media.
case 'field_user_picture':
case 'picture':
// Check for a missing user image in the view.
if (!strip_tags($field->content, '<img>')) {
// Add the user placeholder image.
$vars[$id] = oa_core_get_user_picture_for_views_fields($field);
// Also provide image to default views templates
$vars['fields'][$id]->content = $vars[$id];
}
break;
}
}
}