You are here

function hook_vud_node_widget_alter in Vote Up/Down 6.3

Alter the widget type depending on the $node.

Parameters

string $widget: The widget type.

$node: The node object or NID being viewed. In the case of Views handlers the full node object may not be available.

3 invocations of hook_vud_node_widget_alter()
vud_node_handler_field_widget::render in vud_node/views/vud_node_handler_field_widget.inc
vud_node_link in vud_node/vud_node.module
Implementation of hook_link().
vud_node_nodeapi in vud_node/vud_node.module
Implementation of hook_nodeapi().

File

vud_node/vud_node.api.php, line 12

Code

function hook_vud_node_widget_alter(&$widget, $node) {
  if ($node->type == 'answer') {
    $widget = 'upanddown';
  }
}