Opened 2 years ago
Last modified 2 years ago
#16718 new feature request
Deprecate in_category in favor of has_category
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | Awaiting Review |
| Component: | Taxonomy | Version: | |
| Severity: | normal | Keywords: | 2nd-opinion has-patch |
| 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 (4)
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.
SergeyBiryukov — 2 years ago
comment:3
SergeyBiryukov — 2 years ago
- Keywords has-patch added; needs-patch removed
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.