You are here

function theme_privatemsg_new_block in Privatemsg 6.2

Same name and namespace in other branches
  1. 6 privatemsg.theme.inc \theme_privatemsg_new_block()
  2. 7.2 privatemsg.theme.inc \theme_privatemsg_new_block()
  3. 7 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 161
Theme functions for privatemsg.

Code

function theme_privatemsg_new_block($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.', array(
      '@count' => $count,
    ));
  }
  return l($text, privatemsg_get_dynamic_url_prefix(), array(
    'attributes' => array(
      'id' => 'privatemsg-new-link',
    ),
  ));
}