Make WordPress Core

Opened 4 years ago

Closed 4 years ago

#51248 closed defect (bug) (fixed)

Rename WP_Comments_List_Table::comment_status_dropdown() to ::comment_type_dropdown()

Reported by: sergeybiryukov's profile SergeyBiryukov Owned by: sergeybiryukov's profile SergeyBiryukov
Milestone: 5.6 Priority: normal
Severity: normal Version:
Component: Comments Keywords: has-patch
Focuses: administration Cc:

Description (last modified by SergeyBiryukov)

Background: #40188, #50815.

[48521] introduced a method for displaying a comment type drop-down for filtering on the Comments list table.

For some reason, the method is called ::comment_status_dropdown(), despite not having anything to do with a comment status. This can be confusing now and problematic when working on tickets like #20977 in the future.

I propose renaming the method to ::comment_type_dropdown() for clarity. It's marked as protected, so there should not be any backward compatibility concerns.

Attachments (1)

51248.diff (1.1 KB) - added by davidbaumwald 4 years ago.

Download all attachments as: .zip

Change History (6)

#1 @SergeyBiryukov
4 years ago

  • Owner set to SergeyBiryukov
  • Status changed from new to accepted

#2 @SergeyBiryukov
4 years ago

  • Description modified (diff)

#3 @davidbaumwald
4 years ago

  • Keywords has-patch added

@davidbaumwald
4 years ago

#4 @SergeyBiryukov
4 years ago

  • Description modified (diff)

#5 @SergeyBiryukov
4 years ago

  • Resolution set to fixed
  • Status changed from accepted to closed

In 48943:

Comments: Rename WP_Comments_List_Table::comment_status_dropdown() to ::comment_type_dropdown().

This better reflects the purpose of the method, which doesn't have anything to do with a comment status.

Follow-up to [48521].

Props davidbaumwald, johnbillion, SergeyBiryukov.
Fixes #51248.

Note: See TracTickets for help on using tickets.