#23966 closed enhancement (invalid)
Allow to use order_by in addition to orderby
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | minor | Version: | 3.5 |
Component: | Taxonomy | Keywords: | |
Focuses: | Cc: |
Description
http://codex.wordpress.org/Function_Reference/get_categories
The above link and the same for wp_list_categories suggests that you can order categories by count. In practice it seems to ignore the parameter. It doesn't seem to work with a few other parameters either -- the only things that seem to work are ID, name, and slug, but these might merely be incidental to the fact that I created my test categories in alphabetical order.
Change History (8)
#1
follow-up:
↓ 6
@
12 years ago
- Component changed from General to Taxonomy
- Severity changed from normal to minor
- Type changed from defect (bug) to enhancement
- Version set to trunk
#2
@
12 years ago
- Summary changed from Order by count not honored by get_categories() to Allow to use order_by in addition to orderby -- was: order by count not honored by get_categories()
#3
@
12 years ago
We're not great on consistency in general, but we use "orderby" exclusively in core.
The only places where "order_by" is found are:
#6
in reply to:
↑ 1
@
12 years ago
- Keywords close added
- Summary changed from Allow to use order_by in addition to orderby -- was: order by count not honored by get_categories() to Allow to use order_by in addition to orderby
- Version changed from trunk to 3.5
Replying to Denis-de-Bernardy:
So, rephrasing this as an enhancement request: be more forgiving and allow to use order_by as well as orderby.
Adding order_by
as an alias for orderby
just in get_categories()
would be inconsistent with other functions that accept orderby
.
Doing that for all the functions still doesn't seem like a good idea.
Oh, bummer, nevermind -- a silly typo: I used order_by instead of orderby...
So, rephrasing this as an enhancement request: be more forgiving and allow to use order_by as well as orderby.