function fb_social_share_link in Facebook social plugins integration 6
Implementation of hook_link
File
- modules/
fb_social_share/ fb_social_share.module, line 110
Code
function fb_social_share_link($type, $object, $teaser = FALSE) {
if ('node' != $type) {
return;
}
// dont like unpublished nodes
if (!$object->status) {
return;
}
if ($teaser && !variable_get('fb_social_share_check_teasers', 1)) {
return;
}
// widget is not to be displayed in the node links. return
if (variable_get('fb_social_share_location', 0)) {
return;
}
$links = array();
if ($type == 'node' && fb_social_share_type($object->type)) {
$links['fb_social_share_class'] = array(
'title' => theme('fb_social_share_widget', fb_social_url('node/' . $object->nid)),
'html' => TRUE,
);
}
return $links;
}