You are here

function theme_privatemsg_roles_format in Privatemsg 7

Same name and namespace in other branches
  1. 6.2 privatemsg_roles/privatemsg_roles.module \theme_privatemsg_roles_format()
  2. 7.2 privatemsg_roles/privatemsg_roles.module \theme_privatemsg_roles_format()

Format a role to be displayed as a recipient.

File

privatemsg_roles/privatemsg_roles.module, line 68
Allows to send messages to all members of a role.

Code

function theme_privatemsg_roles_format($variables) {
  $role = $variables['recipient'];
  $options = $variables['options'];
  if (!empty($options['plain'])) {
    $name = $role->name;
    if (!empty($options['unique'])) {
      $name .= ' [role]';
    }
    return $name;
  }
  return t('%role (role)', array(
    '%role' => $role->name,
  ));
}