#48176 closed defect (bug) (fixed)
Deprecated get_all_category_ids() call can return incorrect results
| Reported by: | johnjamesjacoby | Owned by: | SergeyBiryukov |
|---|---|---|---|
| Priority: | low | Milestone: | 5.4 |
| Component: | Taxonomy | Version: | 4.0 |
| Severity: | minor | Keywords: | 2nd-opinion has-patch |
| Cc: | Focuses: |
Description
In WordPress 4.0.0 and r28679, the get_all_category_ids() function was formally deprecated.
Internally, it continues to rely on a cache key (all_category_ids) that will never be repopulated.
This means anyone still using this deprecated function (yikes, I know...) on an installation with a persistent object cache is highly likely to be retrieving invalid/unexpected results.
Attachments (1)
Change History (6)
#4
@
7 years ago
Some history on the 'all_category_ids' cache key:
- Added in [3011/trunk/wp-admin/admin-db.php]
- Replaced with
clean_category_cache()in [4631/trunk/wp-admin/admin-db.php] - Removed in favor of
clean_term_cache( $id, 'category' )in [5555].
Version 0, edited 7 years ago by
(next)
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Recommend to simply remove caching from this deprecated function completely.
At this point, anyone still using it is not likely doing so for the performance benefit, and
get_termscombined withWP_Term_Querynow provides caching by default.