node_link

Versions
4.6 – 4.7
node_link($type, $node = 0, $main = 0)
5 – 6
node_link($type, $node = NULL, $teaser = FALSE)

Implementation of hook_link().

Code

modules/node.module, line 824

<?php
function node_link($type, $node = 0, $main = 0) {
  $links = array();

  if ($type == 'node') {
    if ($main == 1 && $node->teaser && $node->readmore) {
      $links[] = l(t('read more'), "node/$node->nid", array('title' => t('Read the rest of this posting.'), 'class' => 'read-more'));
    }
  }

  return $links;
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.