'olam_download_performance_details_widget', 'description' => esc_html__('Displays download item peformance details widget. Used in Single Download Sidebar','bmci')); $control_ops = array('id_base' => 'olam_download_performance_details_widget'); parent::__construct('olam_download_performance_details_widget', esc_html__('Olam Download Performance Details','bmci'), $widget_ops, $control_ops); } function widget($args, $instance) { extract($args); echo $before_widget; ?> post->ID; $starRating=null; if(function_exists("fw_ext_feedback_stars_get_post_rating")){ $starRating=fw_ext_feedback_stars_get_post_rating($postID); $starRating=$starRating['average']; $starRating=(round($starRating*2))*10; $commentcount=fw_ext_feedback_stars_get_post_rating($postID); $commentcount=$commentcount['count']; $commentlink='#comments_area'; } elseif ( class_exists( 'EDD_Reviews' ) ) { $starRating = edd_reviews()->average_rating(false); $starRating=(round($starRating*2))*10; $commentcount=edd_reviews()->count_reviews(); $commentlink='#edd-reviews'; } else { $commentcount=olam_get_comment_count($postID); $commentlink='#comments_area'; } ?>