Make WordPress Core

Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#17878 closed enhancement (duplicate)

Add support for `wp_remove_object_terms()`

Reported by: ericmann's profile ericmann Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.2
Component: Taxonomy Keywords: needs-patch has-patch needs-testing
Focuses: Cc:


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:

  1. Get an array of terms for an object
  2. Remove selected terms from the array
  3. 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)

taxonomy.diff (2.0 KB) - added by trepmal 13 years ago.

Download all attachments as: .zip

Change History (4)

13 years ago


#1 @trepmal
13 years ago

  • Cc trepmal@… added
  • Keywords has-patch needs-testing added

Function is based significantly off wp_set_object_terms()

#2 follow-up: @nacin
13 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Duplicate of #15475, methinks.

#3 in reply to: ↑ 2 @ericmann
13 years ago

Replying to nacin:

Duplicate of #15475, methinks.

Methinks you're right. Sadly, that one didn't turn up in my search when I looked first time 'round.

Note: See TracTickets for help on using tickets.