function addthis_node_view in AddThis 7.2
Implement hook_node_view().
File
- ./
addthis.module, line 27 - Stand alone module file to handle AddThis button integration
Code
function addthis_node_view($node, $build_mode) {
$links = array();
if (user_access('view addthis')) {
if ($node && variable_get('addthis_nodetype_' . $node->type, 1) && ($build_mode == 'teaser' && variable_get('addthis_display_in_teasers', '0') || $build_mode == 'full' && variable_get('addthis_display_in_links', '0'))) {
$node->content['addthis'] = array(
'#markup' => _addthis_create_button(array(
'build_mode' => $build_mode,
)),
);
}
}
}