Opened 6 years ago
Last modified 6 years 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: |
Description
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.
- Increase left margin before
Trash(xx)
so that it looks a bit separated. - Change the color of Trash link to
#dc3232
. SinceDelete Permanently
andTrash
links are also using red color. - One more observation. We are writing
Published
,Scheduled
, so I think ratherTrashed
could be used instead ofTrash
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
<?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
<?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)
Change History (3)
Note: See
TracTickets for help on using
tickets.
As we have now