function _fb_social_comments_nodeapi_view in Facebook social plugins integration 7.2
Same name and namespace in other branches
- 6.2 plugins/fb_plugin/comments.inc \_fb_social_comments_nodeapi_view()
nodeapi_view callback for this plugin
1 string reference to '_fb_social_comments_nodeapi_view'
- comments.inc in plugins/
fb_plugin/ comments.inc
File
- plugins/
fb_plugin/ comments.inc, line 186
Code
function _fb_social_comments_nodeapi_view($preset, &$node, $view_mode = 'full') {
// dont disply plugin for unpublished nodes
if (!$node->status) {
return;
}
// this plugin is not enabled on this content type
if (!fb_social_preset_node_types($preset, $node->type)) {
return;
}
// it's not supposed to be displayed in this view mode ?
if (empty($preset->settings['plugin_location']['node_view_modes'][$view_mode])) {
return;
}
$preset->fb_attrs['href'] = fb_social_url('node/' . $node->nid);
$output = fb_social_preset_view($preset);
$node->content['fb_social_' . $preset->name] = array(
'#markup' => $output,
'#weight' => 20,
);
}