Opened 11 years ago
Closed 11 years ago
#34338 closed defect (bug) (fixed)
wp_remove_object_terms() should call wp_cache_delete() like wp_set_object_terms()
| Reported by: | tszming | Owned by: | boonebgorges |
|---|---|---|---|
| Priority: | normal | Milestone: | 4.4 |
| Component: | Taxonomy | Version: | 3.6 |
| Severity: | normal | Keywords: | has-patch has-unit-tests |
| Cc: | Focuses: |
Description
If you call get_the_terms() after wp_remove_object_terms(), cached terms will be returned.
Failed:
wp_remove_object_terms($id, 'test', 'mycategory');
$terms = get_the_terms($id, 'mycategory');
Ok:
wp_set_object_terms($id, null, 'mycategory');
$terms = get_the_terms($id, 'mycategory');
wp_cache_delete() need to be place inside the wp_remove_object_terms() like wp_remove_object_terms()
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)
Test