You are here

function hook_vud_votes in Vote Up/Down 7

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

Modify the vote just before it is casted.

Parameters

$votes: A votes array that is going to be passed to votingapi_set_votes() function.

File

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

Code

function hook_vud_votes(&$votes) {

  // let's add a new vote at the same time with an own vote tag
  $new_vote = $votes[0];
  $new_vote['tag'] = 'our_custom_tag';
  $votes[] = $new_vote;
}