You are here

function theme_privatemsg_list_field__count in Privatemsg 7

Same name and namespace in other branches
  1. 7.2 privatemsg.theme.inc \theme_privatemsg_list_field__count()

Theme the replies field.

See also

theme_privatemsg_list_field()

Related topics

File

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

Code

function theme_privatemsg_list_field__count($variables) {
  $thread = $variables['thread'];
  $field = array();
  $field['data'] = $thread['count'];
  $options = array();
  if (!empty($thread['is_new']) && $thread['is_new'] < $thread['count']) {
    $options['fragment'] = 'new';
    $field['data'] .= '<br />' . l(format_plural($thread['is_new'], '(1 new)', '(@count new)'), 'messages/view/' . $thread['thread_id'], $options);
  }
  $field['class'][] = 'privatemsg-list-count';
  return $field;
}