You are here

function ds_search_extra_info in Display Suite 7

Same name and namespace in other branches
  1. 7.2 modules/ds_search/ds_search.module \ds_search_extra_info()

Returns the info field, just like default search.

1 string reference to 'ds_search_extra_info'
ds_search_ds_fields_info in modules/ds_search/ds_search.module
Implements hook_ds_fields_info().

File

modules/ds_search/ds_search.module, line 117
Display Suite search.

Code

function ds_search_extra_info($field) {
  $info = array();
  $info['user'] = theme('username', array(
    'account' => $field['entity'],
  ));
  $info['date'] = format_date($field['entity']->changed, 'short');
  if (isset($field['entity']->search_extra) && is_array($field['entity']->search_extra)) {
    $info = array_merge($info, $field['entity']->search_extra);
  }
  return implode(' - ', $info);
}