Opened 5 years ago
Closed 5 years ago
#47929 closed defect (bug) (fixed)
Add missing DocBlock in `display` method of `WP_Comments_List_Table` class
Reported by: | itowhid06 | Owned by: | dinhtungdu |
---|---|---|---|
Milestone: | 5.3 | Priority: | normal |
Severity: | minor | Version: | |
Component: | Administration | Keywords: | has-patch needs-copy-review |
Focuses: | docs | Cc: |
Description
Added missing DocBlock in display
method of WP_Comments_List_Table
class.
Attachments (4)
Change History (17)
#1
@
5 years ago
- Component changed from General to Administration
- Focuses docs added
- Milestone changed from Awaiting Review to 5.3
- Owner set to SergeyBiryukov
- Status changed from new to reviewing
This ticket was mentioned in Slack in #core by pento. View the logs.
5 years ago
#4
follow-up:
↓ 5
@
5 years ago
- Keywords needs-patch added; has-patch needs-refresh removed
@itowhid06 Thanks for the patch. As we discussed in the Slack, the description should be expanded. Consider these:
- Adding explanation on why we need to override the
display
method. - Adding
@since
tag for the docs.
By the way, don't forget to add a .
to the end of the comment.
#5
in reply to:
↑ 4
@
5 years ago
Replying to dinhtungdu:
@itowhid06 Thanks for the patch. As we discussed in the Slack, the description should be expanded. Consider these:
- Adding explanation on why we need to override the
display
method.- Adding
@since
tag for the docs.By the way, don't forget to add a
.
to the end of the comment.
I really don't think there is much more to add in the description except a .
. Though a lot of method DocBlock instances even some in class WP_List_Table
needs to be added with a .
.
And about the @since
tag, I'm not sure about the version when the method was introduced.
#6
@
5 years ago
@itowhid06 Not every class that extends WP_List_Table
overrides the display
method. We do it in WP_Comments_List_Table
because we render a number of hidden extra comments.
Though a lot of method DocBlock instances even some in class WP_List_Table needs to be added with a
.
.
I agree :). But let's leave it for the other ticket.
And about the @since tag, I'm not sure about the version when the method was introduced.
I will find it for you.
#7
@
5 years ago
It's 3.1.0
.
Actually, we did have the comment for display()
before. (r17228). But it got deleted for some reason.
#8
@
5 years ago
@itowhid06 Thanks for the patch, but I think we can be more precise for this case. What about this?
Display the comment table. Override the parent method to render extra comments.
#9
@
5 years ago
@dinhtungdu , I've copied the text from display function in WP_Plugin_Install_List_Table
class. If you insist then I can surely update it :)
#10
@
5 years ago
Yeah, I still think the comment list table acts differently from other list tables, so we're better to be precise here. Please update it. Thank you so much! :)
PS: It took me 10 minutes to find out why we need extra hidden comments (They are used to append to the table when you delete or mark a comment as spam.). I think we can save other people many 10 minutes
:D.
The method description here needs to be expanded a bit. @dinhtungdu volunteered in Slack to refresh the patch.