[wp-trac] [WordPress Trac] #40188: Filter button should not appear when no comments are available in list

WordPress Trac noreply at wordpress.org
Tue Jul 11 10:55:55 UTC 2017


#40188: Filter button should not appear when no comments are available in list
----------------------------------------+---------------------------------
 Reporter:  swissspidy                  |       Owner:  Jim_Panse
     Type:  defect (bug)                |      Status:  assigned
 Priority:  normal                      |   Milestone:  Awaiting Review
Component:  Comments                    |     Version:
 Severity:  normal                      |  Resolution:
 Keywords:  good-first-bug needs-patch  |     Focuses:  ui, administration
----------------------------------------+---------------------------------
Changes (by swissspidy):

 * keywords:  good-first-bug has-patch => good-first-bug needs-patch


Comment:

 @akbarhusen429 Have you tested this? Because there's no `has_comments()`
 method in `WP_Comments_List_Table()`. That means your code doesn't work.

 There was such a method in [attachment:40188.2.patch], but as per prior
 comments it was not really needed.

 Also see another comment above:

 > This is a feature common to all list tables (WP_List_Table) i.e, all
 lists should display the Filter option if and only if there is at least
 one list item.
 > With this in mind, a solution at the WP_List_Table class level would be
 better.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/40188#comment:11>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list