Make WordPress Core

Opened 13 months ago

Last modified 8 months ago

#45864 new enhancement

On list page All(x) count does not consider Trash items. Hence Trash should appear differently

Reported by: subrataemfluence Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 5.0.2
Component: Posts, Post Types Keywords: 2nd-opinion has-screenshots
Focuses: ui, administration Cc:
PR Number:


I find it confusing with the way WordPress shows All(xx) along with a broken down counts of each status when we have trashed items, All(xx) only considers un-trashed posts.

So I feel displaying Trash(xx) exactly as rest of the status is not visually right. Since Trashed items are not considered in All count, it needs to be displayed a bit differently.

I think if we can do something like the following it will look more logical.

  1. Increase left margin before Trash(xx) so that it looks a bit separated.
  2. Change the color of Trash link to #dc3232. Since Delete Permanently and Trash links are also using red color.
  3. One more observation. We are writing Published, Scheduled, so I think rather Trashed could be used instead of Trash to match the rest.

Here is a proposed solution:

File: /wp-admin/css/common.css

.subsubsub li.trash-posts {
    margin-left: 2rem;

.subsubsub li.trash-posts a {
    color: #dc3232;

File: wp-admin/includes/class-wp-list-table.php

public function views() {
   foreach ( $views as $class => $view ) {
     if(  'trash' === $class ) {
       $views[$class] = "\t<li class='$class trash-posts'>$view";
     } else {
       $views[$class] = "\t<li class='$class'>$view";

File: wp-includes/post.php

register_post_status( 'trash', array(
  'label'       => _x( 'Trash', 'post status' ),
  'label_count' => _n_noop( 'Trash <span class="count">(%s)</span>', 'Trashed <span class="count">(%s)</span>' ),
) );

Please let me know if this makes sense.

Attachments (2)

before.png (5.3 KB) - added by subrataemfluence 13 months ago.
As we have now
after.png (15.0 KB) - added by subrataemfluence 13 months ago.
After applying proposed modifications

Download all attachments as: .zip

Change History (3)

13 months ago

As we have now

13 months ago

After applying proposed modifications

#1 @SergeyBiryukov
8 months ago

  • Component changed from Text Changes to Posts, Post Types
Note: See TracTickets for help on using tickets.