Opened 14 years ago
Closed 12 years ago
#21200 closed defect (bug) (fixed)
get_all_category_ids() only used by a deprecated function
| Reported by: | Latz | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | 4.0 |
| Component: | Taxonomy | Version: | 3.4.1 |
| Severity: | minor | Keywords: | has-patch easy-fix |
| Cc: | Focuses: |
Description
The function "get_all_category_ids()" (category.php) is only used by the deprecated function "get_category_children". I got two ideas for the future of the function:
a) also deprecate it
b) create a function "get_all_taxonomy_ids($taxonomy)". Since it seems to be a common problem for programmers to get e.g. all tag ids I would prefer this.
Attachments (2)
Change History (6)
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
The actual querying of the ids is done via get_terms() anyway:
$cat_ids = get_terms( 'category', array('fields' => 'ids', 'get' => 'all') );The only benefit of get_all_category_ids() is that it caches the ids. However, that cache doesn't seem to be invalidated anywhere, so it's buggy.
Therefore, I say we deprecate it.