get_total_reviews(); if ( $total_reviews ) { // Build the label and icon markup. $average_rating = round( (float) $recipe->get_average_rating(), 1 ); $recipe_rating_label = ''; $recipe_rating_label .= sprintf( // translators: Ratings from number of reviews. __( '%1$s from %2$s reviews', 'tasty-recipes' ), '' . $average_rating . '', '' . (int) $total_reviews . '' ); $recipe_rating_label .= ''; $recipe_rating_icons = Tasty_Recipes\Ratings::get_rendered_rating( $average_rating ); // Prepend the ratings markup to the post content. $content = '

' . $recipe_rating_icons . '

' . $recipe_rating_label . '

' . PHP_EOL . $content; } } } return $content; });