[wp-trac] [WordPress Trac] #45864: On list page All(x) count does not consider Trash items. Hence Trash should appear differently
WordPress Trac
noreply at wordpress.org
Tue Jan 8 13:29:51 UTC 2019
#45864: On list page All(x) count does not consider Trash items. Hence Trash should
appear differently
--------------------------------+-----------------------------------------
Reporter: subrataemfluence | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Text Changes | Version: 5.0.2
Severity: normal | Keywords: 2nd-opinion has-screenshots
Focuses: ui, administration |
--------------------------------+-----------------------------------------
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`
{{{#!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
<?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.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/45864>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list