[wp-trac] [WordPress Trac] #38238: Sorting a list table by some kind of count should default to DESC initially
WordPress Trac
noreply at wordpress.org
Fri Oct 14 12:51:38 UTC 2016
#38238: Sorting a list table by some kind of count should default to DESC initially
-------------------------------------------------+-------------------------
Reporter: helen | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting
Component: Administration | Review
Severity: normal | Version:
Keywords: good-first-bug has-patch needs- | Resolution:
testing needs-unit-tests | Focuses:
-------------------------------------------------+-------------------------
Comment (by Harold Angenent):
Attached a patch also created on WCNL, which holds a different approach.
This patch introduces a new way to communicate with the
`manage_{$this->screen->id}_sortable_columns` filter, which uses an
associative array instead of an indexed array to make each property more
clear. Usage:
{{{#!php
$sortable['column_name'] = array(
'query_var' => 'query_var_name',
'order' => 'DESC',
);
}}}
The patch also switches around the default sorting behaviour (to DESC)
for:
- `WP_Links_List_Table`: rating
- `WP_Media_List_Table`: comment_count
- `WP_MS_Users_List_Table`: registered date
- `WP_Posts_List_Table`: comment_count (as proposed in the ticket
description)
- `WP_Terms_List_Table`: posts count (as proposed in the ticket
description)
--
Ticket URL: <https://core.trac.wordpress.org/ticket/38238#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list