wpDiscuz 7 API Documentation

  1. Home
  2. Docs
  3. wpDiscuz 7 API Documentation
  4. Actions
  5. wpdiscuz_add_rating
Generic selectors
Exact matches only
Search in title
Search in content
Post Type Selectors


This hook can be used for doing some action when the post is being rated.


since 7.1.1 version


1. $rating (type: int) – the rating made by the user
2. $postId (type: int) – the rated post ID


add_action("wpdiscuz_add_rating", function ($rating, $postId) {
    if (function_exists("my_custom_function")) {
        my_custom_function($rating, $postId);
}, 10, 2);

Was this article helpful to you? Yes 1 No