This filter (gdrts_calculate_emote_this_item) is used to filter item after the vote calculations have been done after voting.
This filter provides 4 arguments. Using this filter allows modifications to the $item and even modification of the calculated ratings. Do not use if you are not sure what this can do.
Arguments
- $item: item used to do calculations for.
- $action: action can be vote or revote.
- $vote: vote added to the calculation.
- $previous: if $action is a revote, this is the vote being replaced.
Example
add_filter('gdrts_calculate_emote_this_item', 'custom__gdrts_calculate_emote_this_item', 10, 4); function custom__gdrts_calculate_emote_this_item($item, $action, $vote, $previous) { // modify the $item object // // return the $item object// return $item; }
Comments