You are here

function hook_vud_widget_message_codes in Vote Up/Down 7

Same name and namespace in other branches
  1. 6.3 vud.api.php \hook_vud_widget_message_codes()
  2. 6.2 hook_vud.php \hook_vud_widget_message_codes()
  3. 7.2 vud.api.php \hook_vud_widget_message_codes()

Modify the array of know messages.

For a real implementation take a look at vud_node_vud_widget_message_codes_alter() and its implementation of hook_nodeapi() on vud_node module.

Parameters

$widget_message_codes: The array of know messages passed by reference to modify it.

File

./vud.api.php, line 51
This file contains module hooks for users of Vote Up/down.

Code

function hook_vud_widget_message_codes(&$widget_message_codes) {

  // Add a new message code with its description, take a look to the
  // constant definition for more information
  // This is a dummy message to notify voting is posponed. It make sense
  // on a new vud_<entity> module since we only can include new messages
  // while we are doing a real vote work.
  $widget_message_codes[VUD_NEWENTITY_WIDGET_MESSAGE_POSTPONED] = t('The voting on this is postponed, please wait a while. we will be open the voting soon');
}