#16718 closed enhancement (fixed)
Deprecate in_category in favor of has_category
| Reported by: | Otto42 | Owned by: | SergeyBiryukov |
|---|---|---|---|
| Priority: | normal | Milestone: | 3.7 |
| Component: | Taxonomy | Version: | |
| Severity: | normal | Keywords: | has-patch commit |
| Cc: | Focuses: |
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
@
16 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.
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
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.