Opened 10 years ago
Closed 10 years ago
#31364 closed defect (bug) (fixed)
Order By Description does not work in edit-tags.php
Reported by: | neil_pie | Owned by: | boonebgorges |
---|---|---|---|
Milestone: | 4.2 | Priority: | normal |
Severity: | normal | Version: | 4.2 |
Component: | Taxonomy | Keywords: | has-patch |
Focuses: | Cc: |
Description
In WP_Terms_List_Table, 'description' is defined as a sortable column, yet when clicking on the column header in the UI, the table sorts by name instead.
This seems to be because 'description' is missed out of the predefined arguments for the 'orderby' parameter in get_terms(), and so the default orderby of t.name
is applied.
This patch adds 'description' as an option, ordering on the tt.descripton
field
Attachments (1)
Change History (6)
This ticket was mentioned in Slack in #core by neil_pie. View the logs.
10 years ago
#4
@
10 years ago
- Keywords dev-feedback removed
- Milestone changed from Awaiting Review to 4.2
As discussed in Slack:
- The problem was introduced when edit-tags.php was converted to list tables [15491]. The sorting has therefore never worked properly.
- There was some question surrounding the question of whether most people would want this data to be sortable. If you are using sentences to describe your terms (as suggested, I think, by the term "description"), it probably doesn't make sense to sort alphabetically by 'description'.
- That being said, it's easy to imagine ways of using the 'description' field in a way that would make sort-by-description a useful feature, and there's no harm in adding it, so onward we march.
Note: See
TracTickets for help on using
tickets.
Of note - if this patch is accepted, I can change the Codex page for get_terms accordingly
http://codex.wordpress.org/Function_Reference/get_terms