function _fb_social_subscribe_link in Facebook social plugins integration 7.2
Same name and namespace in other branches
- 6.2 plugins/fb_plugin/subscribe.inc \_fb_social_subscribe_link()
Pseudo hook_link for this plugin
1 string reference to '_fb_social_subscribe_link'
- subscribe.inc in plugins/
fb_plugin/ subscribe.inc
File
- plugins/
fb_plugin/ subscribe.inc, line 187
Code
function _fb_social_subscribe_link($preset, $type, $object, $view_mode) {
$links = array();
// no subscribe for unpublished nodes
if (!$object->status) {
return $links;
}
// if no plugin on this particular view_mode, return
if (empty($preset->settings['plugin_location']['node_view_modes'][$view_mode])) {
return $links;
}
// plugin is not to be displayed in the node links. continue
if ($preset->settings['plugin_location']['location']) {
return $links;
}
// good to go
if (fb_social_preset_node_types($preset, $object->type)) {
$link_title = fb_social_preset_view($preset);
$links['fb-social-subscribe-' . $preset->name] = array(
'title' => $link_title,
'html' => TRUE,
);
}
return $links;
}