#17878 closed enhancement (duplicate)
Add support for `wp_remove_object_terms()`
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Taxonomy | Version: | 3.2 |
| Severity: | normal | Keywords: | needs-patch has-patch needs-testing |
| Cc: | trepmal@… |
Description
WordPress currently provides functions for setting and retrieving taxonomy terms for a post, but there is no support for removing taxonomy terms. Currently, developers must:
- Get an array of terms for an object
- Remove selected terms from the array
- Overwrite the object's terms using wp_set_object_terms()
This process is somewhat standard, and not too difficult to manage. But most other functions in core come in a get/set/delete set, and this should be no exception.
wp_remove_object_terms() should accept similar parameters as wp_set_object_terms().
Attachments (1)
Change History (4)
- Cc trepmal@… added
- Keywords has-patch needs-testing added
Function is based significantly off wp_set_object_terms()
- Milestone Awaiting Review deleted
- Resolution set to duplicate
- Status changed from new to closed
Duplicate of #15475, methinks.
Note: See
TracTickets for help on using
tickets.

wp_remove_object_terms()