function _privatemsg_block_new in Privatemsg 6
Same name and namespace in other branches
- 6.2 privatemsg.module \_privatemsg_block_new()
- 7.2 privatemsg.module \_privatemsg_block_new()
- 7 privatemsg.module \_privatemsg_block_new()
1 call to _privatemsg_block_new()
File
- ./
privatemsg.module, line 1489 - Allows users to send private messages to other users.
Code
function _privatemsg_block_new() {
$block = array();
if (!privatemsg_user_access()) {
return $block;
}
$count = privatemsg_unread_count();
if ($count) {
$block = array(
'subject' => format_plural($count, 'New message', 'New messages'),
'content' => theme('privatemsg_new_block', $count),
);
return $block;
}
return array();
}