function theme_privatemsg_list_field__subject

7-1 privatemsg.theme.inc theme_privatemsg_list_field__subject($variables)
7-2 privatemsg.theme.inc theme_privatemsg_list_field__subject($variables)

Theme the subject of the thread.

Related topics

File

./privatemsg.theme.inc, line 61
Theme functions for privatemsg.

Code

function theme_privatemsg_list_field__subject($variables) {
  $thread = $variables['thread'];
  $field = array();
  $options = array();
  $is_new = '';
  if (!empty($thread['is_new'])) {
    $is_new = theme('mark', array('type' => MARK_NEW));
    $options['fragment'] = 'new';
  }
  $subject = $thread['subject'];
  if ($thread['has_tokens']) {
    $message = privatemsg_message_load($thread['thread_id']);
    $subject = privatemsg_token_replace($subject, array('privatemsg_message' => $message), array('sanitize' => TRUE, 'privatemsg-show-span' => FALSE));
  }
  $field['data'] = l($subject, 'messages/view/' . $thread['thread_id'], $options) . $is_new;
  $field['class'][] = 'privatemsg-list-subject';
  return $field;
}