#16718 closed enhancement (fixed)
Deprecate in_category in favor of has_category
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | 3.7 | Priority: | normal |
| Severity: | normal | Version: | |
| Component: | Taxonomy | Keywords: | has-patch commit |
| Focuses: | Cc: |
Description
#12526 introduced has_category. There was some patches there which did and did not deprecate in_category.
End result is that they're now both in category-template.php, doing the exact same thing (serving as a wrapper to has_term).
I think we need some naming consistency here. Deprecate one or the other of them in 3.2, perhaps.
Attachments (1)
Change History (8)
#2
@
15 years ago
Ah.. well, in that case, it might be worth making one call the other in order to avoid duplicated code and/or to prevent future changes from not happening to both of them.
Also, might be worth switching twentyten to use has_category.
#4
@
12 years ago
- Keywords commit added; 2nd-opinion removed
Patch looks good, and does exactly what was advertised. in_category() becomes an alias of has_category() without being deprecated (avoiding us being evil).
Note: See
TracTickets for help on using
tickets.
There was some discussion on this, possibly in IRC... Basically, in_category() is such an old function used by so much code, simply renaming it for pure consistency will be annoying, especially for reviewed themes. We're evil, but not that evil. Introducing has_category() but not deprecating is_category() seemed like a fine idea at the time.