This file contains 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
<?php | |
/** | |
* Template Name: My Test Page Pro | |
* | |
* This page template is just an example of how you can use the API to display the rating results | |
* and the rating form using Multi Rating Pro. Twitter Bootstrap 3 scaffolding has used for the grid. | |
*/ | |
get_header(); ?> | |
</header> |
This file contains 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
<?php | |
$params = array( | |
'post_id' => 10, | |
'title' => 'My Rating Form' | |
); | |
MRP_Multi_Rating_API::display_rating_form($params); | |
MRP_Multi_Rating_API::display_rating_result(array( | |
'post_id' => 10, | |
'rating_form_id' => 1 | |
)); |
This file contains 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
<?php | |
global $post; | |
if (!isset($post_id) isset($post)) { | |
$post_id = $post->ID; | |
} | |
?> |
This file contains 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
<?php if ( class_exists( 'MRP_Multi_Rating_API' ) ) { | |
MRP_Multi_Rating_API::display_rating_result( ); | |
} ?> |
This file contains 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
<?php | |
MRP_Multi_Rating_API::display_user_rating_results(array( | |
'no_rating_results_text' => 'No Rating Results', | |
'show_date' => true, | |
'echo' => true, | |
'title' => 'John\'s Results', | |
'show_filter' => true, | |
'username' => 'johnsmith' | |
)); | |
?> |
This file contains 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
<?php | |
MRP_Multi_Rating_API::display_rating_result_reviews(array( | |
'post_id' => "", // means all posts are used | |
'rating_form_id' => 1, | |
'show_avatar' => true, | |
'show_date' => true, | |
'comments_only' => true, | |
'echo' => true, | |
'before_name' => 'Name: ', | |
'before_comment' => 'Comment: ', |
This file contains 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
<?php | |
return MRP_Multi_Rating_API::display_rating_results_list(array( | |
'show_count' => true, | |
'title' => 'Top Rating Results', | |
'rating_form_id' => 1, | |
'show_filter' => true, | |
'filter_label_text' => __( 'Choose a category', 'my-text-domain' ), | |
'filter_button_text' => __( 'Filter', 'my-text-domain' ), | |
'taxonomy' => 'category', | |
'term_id' => 0 // for all, |
This file contains 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
<?php | |
MRP_Multi_Rating_API::display_rating_form(array( | |
'title' => 'My Rating Form', | |
'submit_button_text' => 'Submit Rating', | |
'update_button_text' => 'Update Rating', | |
'delete_button_text' => 'Delete Rating', | |
'show_name_input' => true, | |
'show_email_input' => false, | |
'show_comment_textarea' => true, | |
'echo' => true |
This file contains 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
<?php | |
MRP_Multi_Rating_API::display_rating_item_results(array( | |
'layout' => 'options_block' | |
)); | |
?> |
This file contains 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
<?php | |
MRP_Multi_Rating_API::display_rating_result(array( | |
'show_rich_snippets' => false, | |
'show_count' => true, | |
'echo' => true | |
)); | |
?> |
OlderNewer