Make WordPress Core

Opened 10 months ago

Last modified 3 months ago

#50815 reviewing defect (bug)

Use consistent checks for displaying the Filter button in different list tables

Reported by: whyisjake Owned by: SergeyBiryukov
Milestone: 5.8 Priority: normal
Severity: normal Version:
Component: Administration Keywords: has-patch
Focuses: ui, administration, multisite Cc:


As an extension of #40188, let's bring some consistency to class-wp-posts-list-table.php and class-wp-ms-sites-list-table.php to check $this->has_items(), instead of ! empty( $output ).

Attachments (1)

50815.patch (1.1 KB) - added by mukesh27 10 months ago.
Initial patch.

Download all attachments as: .zip

Change History (10)

10 months ago

Initial patch.

#1 @mukesh27
10 months ago

  • Keywords has-patch added; needs-patch removed

#2 @SergeyBiryukov
9 months ago

  • Milestone changed from Awaiting Review to 5.6
  • Owner set to SergeyBiryukov
  • Status changed from new to reviewing

#3 @SergeyBiryukov
9 months ago

In 48724:

Comments: Restore the ::has_items() call in WP_Comments_List_Table::extra_tablenav() for now, until unit tests are updated accordingly.

Follow-up to [48722].

Fixes #40188. See #50815.

#4 @SergeyBiryukov
9 months ago

Just to clarify on comment:23:ticket:40188, I didn't mean that ! empty( $output ) should necessarily be replaced with $this->has_items(), only that a consistent check should ideally be used in all list tables, whether it's the former, the latter, or both.

#5 @SergeyBiryukov
9 months ago

  • Summary changed from Use `$this->has_items()` for content checks in different list classes. to Use consistent checks for displaying the Filter button in different list tables

#6 @SergeyBiryukov
9 months ago

In 48741:

Comments: Remove a few more unnecessary instances of esc_html() in WP_Comments_List_Table::comment_status_dropdown().

Core translations are considered safe, and these labels are not escaped in any other instances.

Follow-up to [48521], [48722], [48724].

See #40188, #50815.

#7 @helen
6 months ago

Is anything left here?

#8 @SergeyBiryukov
6 months ago

  • Milestone changed from 5.6 to 5.7

comment:4:ticket:50815 still left to address, moving to the next release for now.

#9 @lukecarbis
3 months ago

  • Milestone changed from 5.7 to 5.8

Since we're in 5.7 beta 3, let's move this to the next release again.

Note: See TracTickets for help on using tickets.