There are heaps of action hooks & filters you can use to customize the plugin. Here are some of the more common ones.
Action Hooks
Hook | Description |
---|---|
mrp_before_delete_rating_entry | Before a rating entry is deleted. |
mrp_after_delete_rating_entry_success | After a rating entry has been successfully deleted. |
mrp_before_delete_rating_form | Before a rating form is deleted in plugin settings. |
mrp_after_delete_rating_form | After a rating form is deleted in plugin settings. |
mrp_before_delete_rating_item | Before a rating item is deleted. |
mrp_after_delete_rating_item | After a rating item is deleted. |
mrp_before_save_rating_form | Befofe a rating form is saved in plugin settings. |
mrp_after_save_rating_form | After a rating form is saved in plugin settings. |
mrp_before_save_rating_entry | Before a rating entry is saved (new or updated). |
mrp_after_save_rating_entry_success | After a rating entry is saved (new or updated). |
Filters
Filter | Description |
---|---|
mrp_auto_approve_ratings | Change the condition when ratings are automatically approved. |
mrp_save_rating_response | Modify the response data when a rating is saved or updated. |
mrp_delete_rating_response | Modify the response data when a rating is deleted. |
mrp_icon_font_library_options | Add custom font icon libraries for star ratings as an option. |
mrp_icon_classes | Map CSS icon classes for custom font icon libraries. |
mrp_default_rating_form | Override the logic to determine the default rating form. |
mrp_rating_form | Override the logic to set the rating form. |
mrp_before_rating_entry_validation | Before rating entry is validated. Add your own custom validation errors if needed. |
mrp_after_rating_entry_validation | After rating entry has been validated. Add your own custom validation errors if needed. |
mrp_rating_moderation_notification_template_tags | Add your own substitution values in the e-mail template if needed (e.g. {custom_field_name}) |
mrp_rating_approved_notification_template_tags | Add your own substitution values in the e-mail template if needed (e.g. {custom_field_name}) |
mrp_can_do_shortcode | Change condition when a shortcode is enabled. |
mrp_can_apply_widget | Change condition when a widget is enabled. |
mrp_can_apply_auto_placement | Change condition when auto placement is enabled. |
mrp_delete_orphaned_data | In case you want to run your own checks for orphaned data that needs to be cleaned up whenever the clean db tool is used. |
And there are many more… Nearly all SQL queries in the API have filters to customize the select, join, from, where, order by, group etc…