function biblio_link in Bibliography Module 6.2
Same name and namespace in other branches
- 5 biblio.module \biblio_link()
- 6 biblio.module \biblio_link()
Implements hook_link().
This is implemented so that an edit link is displayed for users who have the correct permission(s) to edit a node.
File
- ./
biblio.module, line 575 - Main file for Drupal module biblio.
Code
function biblio_link($type, $node = NULL, $teaser = FALSE) {
$links = array();
$base = variable_get('biblio_base', 'biblio');
if ($type == 'node' && $node->type == 'biblio') {
// Don't display a redundant edit link if they are node administrators.
if (biblio_access('update', $node) && !user_access('administer nodes')) {
$links['biblio_edit'] = array(
'title' => t('edit this entry'),
'href' => "node/{$node->nid}/edit",
);
}
if (biblio_access('export', $node)) {
$show_link = variable_get('biblio_lookup_links', array(
'google' => TRUE,
));
if ($show_link['google']) {
$links['biblio_google_scholar'] = theme('google_scholar_link', $node);
}
}
}
return $links;
}