Developer Knowledge Level

This content is intended for WordPress developers, and it may require coding knowledge of WordPress, PHP, and JavaScript. Code examples provided here may contain errors or needs some additional coding. Make sure to test the code before using it on a live website!

This filter (gdrts_calculate_slider_review_item) is used to filter item after the vote calculations have been done after voting.

This filter provides 5 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.


  • $item: item used to do calculations for.
  • $action: action can be vote or revote.
  • $vote: vote added to the calculation.
  • $max: max vote value.
  • $previous: if $action is a revote, this is the vote being replaced.


add_filter('gdrts_calculate_slider_review_item', 'custom__gdrts_calculate_slider_review_item', 10, 5);
function custom__gdrts_calculate_slider_review_item($item, $action, $vote, $max, $previous) {
  // modify the $item object //

  // return the $item object//
  return $item;
Rate this reference

You are not allowed to rate this post.

Leave a Comment