You are here

function quotes_link_alter in Quotes 6

Implementation of hook_link_alter().

File

./quotes.module, line 610
The quotes module allows users to maintain a list of quotes that can be displayed in any number of administrator-defined quote blocks.

Code

function quotes_link_alter(&$links, $node) {
  if ($node->type == 'quotes') {

    // Remove some links from blocks.
    $in_block = isset($node->in_block) && $node->in_block;
    if ($in_block) {
      unset($links['comment_add'], $links['comment_comments'], $links['statistics_counter']);

      // Get rid of taxonomy links in the block.
      foreach ($links as $key => $link) {
        if (drupal_substr($key, 0, 13) == 'taxonomy_term') {
          unset($links[$key]);
        }
      }
    }
  }
}