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