You are here

function privatemsg_title_callback in Privatemsg 6.2

Same name and namespace in other branches
  1. 6 privatemsg.module \privatemsg_title_callback()
  2. 7.2 privatemsg.module \privatemsg_title_callback()
  3. 7 privatemsg.module \privatemsg_title_callback()
1 call to privatemsg_title_callback()
_privatemsg_block_menu in ./privatemsg.module
1 string reference to 'privatemsg_title_callback'
privatemsg_menu in ./privatemsg.module
Implements hook_menu().

File

./privatemsg.module, line 1478
Allows users to send private messages to other users.

Code

function privatemsg_title_callback($account = NULL) {
  if ($account) {
    $count = privatemsg_unread_count($account);
  }
  else {
    $count = privatemsg_unread_count();
  }
  if ($count > 0) {
    return format_plural($count, 'Messages (1 new)', 'Messages (@count new)');
  }
  return t('Messages');
}