817013978d
Since 4.4, when fetching the first page of comments and the 'newest' comments are set to display first, `comments_template()` must perform arithmetic to determine which comments to show. See #8071. This arithmetic requires the total comment count for the current post, which is calculated with a separate `WP_Comment_Query`. This secondary comment query did not properly account for non-approved comment statuses; all unapproved comments should be part of the comment count for admins, and individual users should have their own unapproved comments included in the count. As a result, `comments_template()` was, in some cases, being fooled into thinking that a post had fewer comments available for pagination than it actually had, which resulted in empty pages of comments. We correct this problem by mirroring 'status' and 'include_unapproved' params of the main comment query within the secondary query used to calculate pagination. Fixes #35068. git-svn-id: https://develop.svn.wordpress.org/trunk@36040 602fd350-edb4-49c9-b593-d223f7449a82 |
||
---|---|---|
.. | ||
phpunit | ||
qunit |