Opened 9 years ago
Closed 9 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 |
---|---|---|---|
Milestone: | 4.4 | Priority: | normal |
Severity: | normal | Version: | 3.6 |
Component: | Taxonomy | Keywords: | has-patch has-unit-tests |
Focuses: | Cc: |
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)
#1
@
9 years ago
- Component changed from General to Taxonomy
- Keywords needs-patch needs-unit-tests added
- Version changed from 4.3.1 to 3.6
#2
@
9 years ago
- Keywords has-patch has-unit-tests added; needs-patch needs-unit-tests removed
@boonebgorges Since you're a component maintainer, would you mind having a look at this?
Note: See
TracTickets for help on using
tickets.
Test