function fb_social_node_view in Facebook social plugins integration 7.2
Implements hook_node_view().
File
- ./
fb_social.module, line 145
Code
function fb_social_node_view($node, $view_mode = 'full') {
$links = fb_social_link('node', $node, $view_mode);
$node->content['links']['fb_social'] = array(
'#theme' => 'links__node__fb_social',
'#links' => $links,
'#attributes' => array(
'class' => array(
'links',
'inline',
),
),
);
if ($presets = fb_social_get_presets()) {
foreach ($presets as $preset) {
$plugin = fb_social_fb_plugin_load($preset->plugin_type);
// delegate hook_nodeapi_view
$function = ctools_plugin_get_function($plugin, 'hook_nodeapi_view');
if ($function) {
$function($preset, $node, $view_mode);
}
}
}
}