You are here

function support_link_alter in Support Ticketing System 6

Implementation of hook_link_alter().

File

./support.module, line 331
support.module

Code

function support_link_alter(&$links, $node, $comment = NULL) {
  if ($node->type == 'support_ticket' && variable_get('support_disable_comment_reply', FALSE)) {
    unset($links['comment_reply']);
  }
  if ($node->type == 'support_ticket' && isset($node->taxonomy)) {
    foreach ($node->taxonomy as $tid => $term) {
      if (isset($links["taxonomy_term_{$tid}"])) {
        $client = support_client_load($node->client);
        $links["taxonomy_term_{$tid}"]['href'] = "support/{$client->path}";
        $links["taxonomy_term_{$tid}"]['query'] = "tid={$tid}";
      }
    }
  }
}