function plus1_node_view in Plus 1 7
Implements hook_node_view().
File
- ./
plus1.module, line 404
Code
function plus1_node_view($node, $view_mode) {
// Only show the voting widget in allowed content types.
if ($node->nid && in_array($node->type, variable_get('plus1_node_types', array()))) {
$is_enabled = 'full' == $view_mode ? 1 : 0;
if (variable_get('plus1_node_in_' . $view_mode . '_view', $is_enabled)) {
$node->content['plus1_widget'] = plus1_build_node_jquery_widget($node->nid);
}
}
}