You are here

function commons_origins_privatemsg_message_view_alter in Drupal Commons 7.3

Implements hook_privatemsg_message_view_alter().

File

themes/commons/commons_origins/template.php, line 170
Process theme data.

Code

function commons_origins_privatemsg_message_view_alter(&$elements) {
  if (isset($elements['message_actions'])) {

    // Move the message links into a different variable and make it a renderable
    // array. Privatemsg has the links hardcoded, so this is the only way to
    // gain control and prevent extra processing.
    $elements['message_links'] = array(
      '#theme' => 'links__privatemsg_message',
      '#links' => $elements['message_actions'],
      '#attributes' => array(
        'class' => array(
          'privatemsg-message-links',
          'links',
        ),
      ),
    );
    unset($elements['message_actions']);
  }
}