A powerful rating system and review plugin for WordPress.
Code Samples
If you have custom code which relies on the Multi Rating Pro plugin and the plugin is disabled, a PHP fatal error will occur. It is best practice to first check the plugin is installed and activated before calling any API functions from a plugin. See class_exists() or function_exists() PHP functions.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The code snippet below allows the user to select an overall star rating as search criteria in the search form. The star ratings are rounded half up or half down e.g. an overall star rating of 4.67/5 will show up in search results for 5 stars.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Changes the count of rating entries displayed alongside the rating results to be “(X ratings)” instead of “(X)”.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
By default, when a rating is saved, updated or deleted, only the rating results for the specific post and rating form are recalculated. If you are using the the [mrp_rating_item_results] shortcode or the rating_item_ids shortcode attribute (e.g. [mrp_rating_result rating_item_ids="1,2"]), the associated rating results are recalculated on page load (not immediately when a rating is saved, updated or deleted).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Font Awesome is used for the star and thumbs icons. To increase the size of the star and thumb icons you can simply increase the font-size using some CSS.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This code sample rearranges the comment form fields for anonymous users. It moves the comment, author, email and url fields to the end of the form. Therefore, any rating items, review fields or custom fields will be shown first in the comment form. Note the code sample relies on the comment_form_fields filter which is only available since WordPress 4.4.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters