Boone Gorges
d524151147
Respect approval status when determining comment page count in comments_template()
.
...
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.
Merges [36040] to the 4.4 branch.
Fixes #35068 .
Built from https://develop.svn.wordpress.org/branches/4.4@36041
git-svn-id: http://core.svn.wordpress.org/branches/4.4@36006 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-12-21 03:11:21 +00:00
..
2015-12-14 05:25:26 +00:00
2015-11-18 23:36:28 +00:00
2015-11-21 02:52:27 +00:00
2015-07-23 10:03:24 +00:00
2015-10-31 04:42:25 +00:00
2015-12-04 05:46:25 +00:00
2015-11-20 04:34:25 +00:00
2015-11-10 12:00:30 +00:00
2015-12-04 23:36:25 +00:00
2015-10-20 05:57:24 +00:00
2015-10-24 22:45:25 +00:00
2015-10-30 10:40:26 +00:00
2015-11-08 20:35:27 +00:00
2015-11-30 04:15:27 +00:00
2015-11-05 23:38:27 +00:00
2015-11-22 03:51:28 +00:00
2015-10-21 14:03:25 +00:00
2015-12-04 23:11:26 +00:00
2015-11-29 02:27:18 +00:00
2015-12-18 18:14:21 +00:00
2015-11-20 07:24:30 +00:00
2015-09-20 03:52:25 +00:00
2015-10-23 15:43:24 +00:00
2015-11-04 18:08:25 +00:00
2015-09-16 12:46:28 +00:00
2015-11-18 22:05:25 +00:00
2015-10-06 23:45:25 +00:00
2015-07-09 07:56:24 +00:00
2015-09-16 12:46:28 +00:00
2015-09-20 03:52:25 +00:00
2015-07-08 17:16:25 +00:00
2015-09-20 03:52:25 +00:00
2015-09-22 14:03:25 +00:00
2015-10-13 17:02:25 +00:00
2015-10-10 15:45:25 +00:00
2015-09-22 13:58:24 +00:00
2015-09-22 15:09:24 +00:00
2015-10-14 17:27:25 +00:00
2015-12-03 15:50:27 +00:00
2015-10-01 03:58:23 +00:00
2015-10-24 18:57:25 +00:00
2015-11-21 02:52:27 +00:00
2015-11-20 17:46:25 +00:00
2015-10-24 18:25:24 +00:00
2015-10-24 18:21:25 +00:00
2015-11-21 02:52:27 +00:00
2015-11-21 02:52:27 +00:00
2015-11-18 17:07:37 +00:00
2015-11-19 05:02:27 +00:00
2015-09-26 07:04:28 +00:00
2015-09-27 21:37:24 +00:00
2015-09-03 03:28:21 +00:00
2015-09-15 16:16:43 +00:00
2015-09-03 03:30:21 +00:00
2015-10-08 19:27:28 +00:00
2015-09-26 07:04:28 +00:00
2015-10-31 20:50:25 +00:00
2015-10-31 20:50:25 +00:00
2015-08-25 20:28:22 +00:00
2015-10-14 23:44:25 +00:00
2015-11-08 02:25:25 +00:00
2015-11-17 11:27:29 +00:00
2015-10-14 23:44:25 +00:00
2015-10-08 22:07:24 +00:00
2015-09-22 13:46:25 +00:00
2015-10-14 23:44:25 +00:00
2015-09-22 13:16:30 +00:00
2015-11-05 16:45:25 +00:00
2015-11-25 21:45:25 +00:00
2015-11-16 19:04:55 +00:00
2015-11-10 06:45:25 +00:00
2015-09-14 15:33:27 +00:00
2015-09-22 13:48:25 +00:00
2015-10-13 01:13:24 +00:00
2015-10-31 20:50:25 +00:00
2015-12-21 02:31:23 +00:00
2015-08-25 20:28:22 +00:00
2015-10-06 13:54:25 +00:00
2015-07-13 21:03:24 +00:00
2015-12-21 03:11:21 +00:00
2015-12-21 02:58:23 +00:00
2015-10-09 04:28:24 +00:00
2015-09-26 04:51:26 +00:00
2015-10-09 16:33:25 +00:00
2015-11-25 21:52:26 +00:00
2015-11-25 22:38:29 +00:00
2015-09-22 13:36:25 +00:00
2015-11-11 23:50:25 +00:00
2015-11-18 20:51:26 +00:00
2015-12-03 20:17:25 +00:00
2015-10-20 16:21:25 +00:00
2015-11-04 17:47:25 +00:00
2015-10-20 16:21:25 +00:00
2015-10-20 16:21:25 +00:00
2015-11-04 17:47:25 +00:00
2015-10-20 16:21:25 +00:00
2015-10-24 18:50:24 +00:00
2015-12-21 02:46:22 +00:00
2015-11-18 17:41:27 +00:00
2015-11-19 17:09:26 +00:00
2015-11-20 07:24:30 +00:00
2015-10-13 17:18:25 +00:00
2015-10-07 17:11:25 +00:00
2015-11-19 16:25:26 +00:00
2015-11-18 20:49:26 +00:00
2015-11-18 20:30:25 +00:00
2015-11-07 16:12:27 +00:00
2015-12-07 20:29:26 +00:00
2015-11-22 03:51:28 +00:00
2015-10-30 02:02:24 +00:00
2015-10-14 23:44:25 +00:00
2015-09-16 22:19:24 +00:00
2015-10-14 23:44:25 +00:00
2015-11-22 03:51:28 +00:00
2015-11-18 17:42:26 +00:00
2015-10-05 15:06:28 +00:00
2015-10-24 17:46:25 +00:00
2015-10-30 08:57:26 +00:00
2015-10-29 11:52:28 +00:00
2015-09-20 03:52:25 +00:00
2015-11-24 23:07:26 +00:00
2015-09-25 23:58:25 +00:00
2015-08-25 20:28:22 +00:00
2015-11-25 18:55:26 +00:00
2015-10-12 17:00:26 +00:00
2015-11-22 03:51:28 +00:00
2015-11-18 21:18:26 +00:00
2015-11-20 07:24:30 +00:00
2015-10-22 12:17:28 +00:00
2015-11-20 07:24:30 +00:00
2015-08-25 20:28:22 +00:00
2015-11-20 03:32:26 +00:00
2015-11-05 21:05:25 +00:00
2015-12-18 17:49:22 +00:00
2015-10-07 10:36:25 +00:00
2015-10-28 14:06:27 +00:00
2015-11-25 21:45:25 +00:00
2015-12-06 15:44:27 +00:00
2015-12-04 23:25:26 +00:00
2015-09-05 22:33:23 +00:00
2015-12-21 03:11:21 +00:00
2015-11-22 03:51:28 +00:00
2015-11-17 06:13:26 +00:00
2015-09-20 03:52:25 +00:00