function extra_get_the_post_score_bar($args = array()) { $default_args = array('post_id' => 0); $args = wp_parse_args($args, $default_args); $post_id = $args['post_id'] ? $args['post_id'] : get_the_ID(); $color = extra_get_post_category_color($post_id); $breakdown_score = get_post_meta($post_id, '_post_review_box_breakdowns_score', true); if (false === extra_post_review()) { return; } $bar = sprintf('<span class="score-bar" style="width:%1$d%%;background-color:%2$s;"><span class="score-text">%3$s</span></span>', esc_attr(max(9, intval($breakdown_score))), esc_attr($color), sprintf(esc_html__('Score %1$d%%', 'extra'), intval($breakdown_score))); return $bar; }
</div> <?php } else { ?> <?php et_builder_set_post_type(); ?> <?php the_content(); ?> <?php } ?> </div> <?php if ($review = extra_post_review()) { ?> <div class="post-wrap post-wrap-review"> <div class="review"> <div class="review-title"> <h3><?php echo esc_html($review['title']); ?> </h3> </div> <div class="review-content"> <div class="review-summary clearfix"> <div class="review-summary-score-box" style="background-color:<?php echo esc_attr($post_category_color); ?> ">