[wp-trac] [WordPress Trac] #8973: Function get_page_of_comment() returns incorrect page numbers
WordPress Trac
noreply at wordpress.org
Mon Apr 8 01:33:22 UTC 2019
#8973: Function get_page_of_comment() returns incorrect page numbers
-------------------------------------+-----------------------
Reporter: GregMulhauser | Owner: pento
Type: defect (bug) | Status: accepted
Priority: normal | Milestone: 5.3
Component: Comments | Version: 2.7
Severity: normal | Resolution:
Keywords: has-patch needs-refresh | Focuses:
-------------------------------------+-----------------------
Changes (by pento):
* keywords: dev-feedback has-patch => has-patch needs-refresh
* milestone: 5.2 => 5.3
Comment:
Thank you for the refresh, @matjack1!
I have a few notes on [attachment:"8973.3.diff"]:
- In `comments_template()`, is there are reason for removing the use of
`wp_get_current_commenter()`? This function allows for commenters who
aren't logged in, but do have a cookie saved with their commenter info.
Unapproved comments should show for these commenters. See
`Tests_Comment_CommentsTemplate::test_query_offset_should_not_include_unapproved_comments()`
for testing this functionality.
- The docblocks for `get_comment_link()` and `get_page_of_comment()` need
to be updated to mention the `include_unapproved` parameter.
- To keep things looking neat, running `composer run format` on the
changed files will automatically format the code according to the
WordPress Coding Standards.
As we're getting quite late in the 5.2 beta period, and there are still
quite a lot of tickets open, I'm going to move this ticket to 5.3. There's
no need to rush this patch, we can take our time reviewing and testing it
to make sure it works as expected. Thank you for your work here!
--
Ticket URL: <https://core.trac.wordpress.org/ticket/8973#comment:34>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list