add-to-cart-edd.php
4 years ago
add-to-cart-woocommerce.php
4 years ago
course-author.php
4 years ago
course-continue.php
4 years ago
course-in-cart.php
4 years ago
course-price-edd.php
4 years ago
course-price-woocommerce.php
4 years ago
course-price.php
4 years ago
course.php
4 years ago
end_content_wrap.php
5 years ago
enrolled-course-progress.php
4 years ago
footer.php
4 years ago
header.php
4 years ago
loop-after-content.php
4 years ago
loop-before-content.php
4 years ago
loop-end.php
5 years ago
loop-start.php
4 years ago
meta.php
4 years ago
rating.php
4 years ago
start_content_wrap.php
4 years ago
thumbnail.php
4 years ago
title.php
4 years ago
rating.php
35 lines
| 1 | <?php |
| 2 | /** |
| 3 | * A single course loop rating |
| 4 | * |
| 5 | * @since v.1.0.0 |
| 6 | * @author themeum |
| 7 | * @url https://themeum.com |
| 8 | * |
| 9 | * @package TutorLMS/Templates |
| 10 | * @version 1.4.3 |
| 11 | */ |
| 12 | |
| 13 | if ( ! defined( 'ABSPATH' ) ) { |
| 14 | exit; |
| 15 | } |
| 16 | |
| 17 | $class = isset( $class ) ? ' ' . $class : ' tutor-mb-8'; |
| 18 | ?> |
| 19 | |
| 20 | <div class="tutor-course-ratings<?php echo esc_html( $class ); ?>"> |
| 21 | <div class="tutor-ratings"> |
| 22 | <div class="tutor-ratings-stars"> |
| 23 | <?php |
| 24 | $course_rating = tutor_utils()->get_course_rating(); |
| 25 | tutor_utils()->star_rating_generator_course($course_rating->rating_avg); |
| 26 | ?> |
| 27 | </div> |
| 28 | |
| 29 | <?php if ($course_rating->rating_avg > 0) : ?> |
| 30 | <div class="tutor-ratings-average"><?php echo apply_filters('tutor_course_rating_average', $course_rating->rating_avg); ?></div> |
| 31 | <div class="tutor-ratings-count">(<?php echo $course_rating->rating_count > 0 ? $course_rating->rating_count : 0; ?>)</div> |
| 32 | <?php endif; ?> |
| 33 | </div> |
| 34 | </div> |
| 35 |