APP_Review_Collection
Class for a review collection
Package
Description Description
Examples of review collections: user reviews, post reviews
Methods Methods
- __construct — Sets up a review collection object
- _calc_avg_rating — Calculates and retrieves the collection average rating
- _calc_relative_rating — Calculates relative rating by adding artifical neutral value
- add_review — Adds a new unique received review to the review collection and updates aggregates
- calc_avg_rating — Calculates and retrieves the collection average rating
- calc_relative_rating — Calculates and retrieves the collection relative rating
- delete_review — Deletes a review from the review collection and updates aggregates
- get_meta — Retrieves the review collection metadata
- get_ratings — Retrieves the ratings list for the review collection
- get_reviews — Abstract method to retrieve a review collection
- save_meta — Updates the review collection metadata on the DB
- set_found_reviews — Set the total found reviews if the 'count' param is passed in WP_Comment_Query.
- set_meta — Sets the metadata for the current review collection
- update_avg_rating — Updates the average rating for the current collection instance