function addtoany_link in AddToAny Share Buttons 5.2
Same name and namespace in other branches
- 5 addtoany.module \addtoany_link()
- 6.3 addtoany.module \addtoany_link()
- 6 addtoany.module \addtoany_link()
- 6.2 addtoany.module \addtoany_link()
Implementation of hook_link().
File
- ./
addtoany.module, line 19 - Stand alone module file to handle AddToAny button integration
Code
function addtoany_link($type, $node = NULL, $teaser = FALSE) {
$links = array();
if ($type === 'node') {
if ($teaser && variable_get('addtoany_display_in_teasers', '0') || !$teaser && variable_get('addtoany_display_in_links', '0')) {
$links['addtoany'] = array(
'title' => _addtoany_create_button($node, $teaser),
'html' => TRUE,
);
}
}
return $links;
}