<?php echo esc_attr__('User Avatar', 'acadlix-addon-for-elementor'); ?>
comment_author); ?>
comment_date_gmt))); ?>
comment_approved == 'pending') { ?>
rating); // Number of filled stars $has_half = ($comment->rating - $filled_stars) > 0; // Check if there's a decimal part for ($i = 1; $i <= 5; $i++) { echo "
"; if ($i <= $filled_stars) { echo ""; } elseif ($has_half && $i == $filled_stars + 1) { echo ""; } else { echo ""; } echo "
"; } ?>
comment_content ?? 0); ?>
post_type === acadlix()->cpt()->course()->get_post_type()) { $aelms_course_to_fetch = $settings['course_review_course']; $aelms_enable_rating = acadlix()->helper()->acadlix_get_option('acadlix_enable_rating_and_reviews') === 'yes'; $aelms_review_pagination_count = (int) acadlix()->helper()->acadlix_get_option('acadlix_review_pagination_count') ?: 10; $aelms_course_id = $post->ID; if (!empty($aelms_course_to_fetch) && \Elementor\Plugin::$instance->editor->is_edit_mode()) { $aelms_course_id = $aelms_course_to_fetch; } $aelms_course = acadlix()->model()->course()->ofCourse()->find($aelms_course_id); $aelms_is_course_purchased = false; $aelms_user_comment = []; $aelms_comments = []; $aelms_user_id = get_current_user_id() ?? 0; $aelms_comments = acadlix() ->model() ->courseReview() ->ofCourseRating() ->ofApproved() ->where('comment_post_ID', $aelms_course_id) ->orderBy('comment_date', 'DESC') ->skip(0) ->take($aelms_review_pagination_count) ->get(); if (is_user_logged_in()) { $aelms_is_course_purchased = $aelms_course->isPurchasedBy($aelms_user_id); $aelms_user_comment = acadlix() ->model() ->courseReview() ->ofCourseRating() ->where('comment_post_ID', $aelms_course_id) ->where('user_id', $aelms_user_id) ->first(); } if ($aelms_course && $aelms_enable_rating) { $aelms_average_rating = $aelms_course->getAverageRating() ?? 0; $aelms_total_ratings = $aelms_course->getTotalRatings() ?? 0; if ($aelms_display_title) { echo sprintf( '<%1$s class="aelms-course-review-title"> ' . esc_html($aelms_title) . ' ', esc_attr($aelms_title_tag) ); } ?>
0; // Check if there's a decimal part for ($aelms_i = 1; $aelms_i <= 5; $aelms_i++) { if ($aelms_i <= $aelms_filled_stars) { echo ''; // Filled star } elseif ($aelms_i == ($aelms_filled_stars + 1) && $aelms_has_half) { echo ''; // Half star } else { echo ''; // Empty star } } ?>
getRatingBreakdown(); for ($aelms_star = 5; $aelms_star >= 1; $aelms_star--) { $aelms_percentage = 0; $aelms_rating_count = $aelms_rating_breakdown[$aelms_star] ?? 0; if ($aelms_total_ratings > 0) { $aelms_percentage = ($aelms_rating_count / $aelms_total_ratings) * 100; } ?>

comment_approved == "pending") { aelms_get_single_review_comment($aelms_user_comment); } if (count($aelms_comments)) { foreach ($aelms_comments as $comment) { aelms_get_single_review_comment($comment); } } ?>
$aelms_current_page ? true : false; ?>
rating : 0; for ($aelms_i = 1; $aelms_i <= 5; $aelms_i++) { $aelms_class = $aelms_i <= $aelms_selected_rating ? 'fas fa-star' : 'far fa-star'; ?>