Skip to content

Instantly share code, notes, and snippets.

@manchumahara
Created December 10, 2018 13:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save manchumahara/6ee3f5e9ea1e63f9df09f03e475810fb to your computer and use it in GitHub Desktop.
Save manchumahara/6ee3f5e9ea1e63f9df09f03e475810fb to your computer and use it in GitHub Desktop.
cbx single criteria rating integration
if ( function_exists( 'cbxscratingreview_postAvgRatingInfo' ) )
{
echo cbxscratingreview_postAvgRatingRender( get_the_ID() );
}
if(function_exists('cbxscratingreview_reviewformRender')){
echo cbxscratingreview_reviewformRender();
}
if ( function_exists( 'cbxscratingreview_postReviewsRender' ) )
{
$cbxscratingreview_setting = new CBXSCRatingReviewSettings( CBXSCRATINGREVIEW_PLUGIN_NAME, CBXSCRATINGREVIEW_PLUGIN_VERSION );
$perpage = intval($cbxscratingreview_setting->get_option('default_per_page', 'cbxscratingreview_review_common_config', 10));
$orderby = get_query_var( 'orderby', 'id' );
$order = get_query_var( 'order', 'DESC' );
$score = isset($_GET['filter_score'])? intval($_GET['filter_score']): '';
echo cbxscratingreview_postReviewsRender( get_the_ID(), $perpage, 1,1, $score,$orderby, $order , true, true );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment