LearnDash_Course_Reviews_Loader::fix_comment_counts( int|string $comment_count, int $post_id )
Fix the displayed Comment Count for a given Post.
Description #
Parameters #
- $comment_count
-
(int|string) (Required) Comment Count, pulled from wp_posts.
- $post_id
-
(int) (Required) Post ID.
Return #
(int|string) Comment Count. Returns string when > 0, int 0 otherwise, matching WordPress core behavior.
Source #
File: includes/course-reviews/core/class-learndash-course-reviews-loader.php
Changelog #
| Version | Description |
|---|---|
| 4.25.1 | Introduced. |