wpDiscuz 7 API Documentation

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


This hook can be used for changing the rating schema.


Added in version 7.0.2


1. $schema (type: string) – the rating schema that should be displayed
2. $key (type: string) – This value should be the rating key if the rating is created by a custom field. The value will be a post if it’s an article rating.
3. $postId (type: int) – the current post ID


add_filter("wpdiscuz_rating_schema", function ($schema, $key, $postId) {
    return get_my_schema_for_post($postId, $key);
}, 10, 3);

Was this article helpful to you? Yes No