You are here

function theme_privatemsg_new_block in Privatemsg 7

Same name and namespace in other branches
  1. 6.2 privatemsg.theme.inc \theme_privatemsg_new_block()
  2. 6 privatemsg.theme.inc \theme_privatemsg_new_block()
  3. 7.2 privatemsg.theme.inc \theme_privatemsg_new_block()

Theme a block which displays the number of new messages a user has.

Related topics

1 theme call to theme_privatemsg_new_block()
_privatemsg_block_new in ./privatemsg.module

File

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

Code

function theme_privatemsg_new_block($count) {
  $count = $count['count'];
  if ($count == 0) {
    $text = t('Click here to go to your messages.');
  }
  else {
    $text = format_plural($count, 'You have a new message! Click here to read it.', 'You have @count new messages! Click here to read them.');
  }
  return l($text, 'messages', array(
    'attributes' => array(
      'id' => 'privatemsg-new-link',
    ),
  ));
}