WordPress.org

Make WordPress Core

Opened 4 years ago

Closed 4 years ago

#12086 closed defect (bug) (fixed)

Hide bulk actions, item filters, and subpages when no items

Reported by: nacin Owned by:
Milestone: 3.0 Priority: low
Severity: trivial Version:
Component: Administration Keywords: has-patch
Focuses: Cc:

Description

How we show an admin page when there are no items to show is very inconsistent. I will attach a screenshot that shows the various examples.

Patch removes all bulk actions, item filters, empty items tables, etc., when there are no items. Additionally, empty subpages are hidden. (An exception is on Media > Library > Unattached, which has a "Scan for lost attachments" button. I've also added the number of Unattached posts next to the Unattached link.)

Patch also clarifies when Trash should show up in Media > Library. (It's if there is ever an item in Trash, whether it is enabled or not. Even if Trash is enabled, if it is empty, no need to show the link.)

It's a messy patch, but that's unavoidable -- all it's really doing is rearranging existing code.

Attachments (2)

12086.diff (8.7 KB) - added by nacin 4 years ago.
12086.png (201.6 KB) - added by nacin 4 years ago.
First screenshot is the expected behavior.

Download all attachments as: .zip

Change History (4)

nacin4 years ago

nacin4 years ago

First screenshot is the expected behavior.

comment:1 sirzooro4 years ago

Related: #11184

comment:2 nacin4 years ago

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

(In [13100]) Consistently hide bulk actions, filters, and subpage links on admin panels when there are no items to show. Fixes #12086

Note: See TracTickets for help on using tickets.