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 623
<?php
function node_link($type, $node = 0, $main = 0) {
$links = array();
if ($type == 'node') {
if (array_key_exists('links', $node)) {
$links = $node->links;
}
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 