You are here

function voting_rules_votingapi_delete in Voting Rules 6

Same name and namespace in other branches
  1. 7 voting_rules.module \voting_rules_votingapi_delete()

Implementation of hook_votingapi_results().

File

./voting_rules.module, line 35
Provides Rules intregration for the Votingapi module

Code

function voting_rules_votingapi_delete($votes) {
  foreach ($votes as $vote) {
    $content = voting_rules_load_content($vote['content_type'], $vote['content_id']);
    if ($content) {
      rules_invoke_event('voting_rules_delete_' . $vote['content_type'], $vote, $content);
      rules_invoke_event('voting_rules_delete', $vote);
    }
  }
}