function addthis_link in AddThis 5.2
Same name and namespace in other branches
- 6.3 addthis.module \addthis_link()
- 6 addthis.module \addthis_link()
- 6.2 addthis.module \addthis_link()
Implementation of hook_link().
File
- ./
addthis.module, line 20 - Stand alone module file to handle AddThis button integration
Code
function addthis_link($type, $node = NULL, $teaser = FALSE) {
$links = array();
if ($type === 'node' && user_access('view addthis')) {
if ($teaser && variable_get('addthis_display_in_teasers', '0') || !$teaser && variable_get('addthis_display_in_links', '0')) {
$links['addthis'] = array(
'title' => _addthis_create_button($node, $teaser),
'html' => TRUE,
);
}
}
return $links;
}