Opened 13 years ago
Closed 13 years ago
#27194 closed defect (bug) (duplicate)
wp.editPost does not allow removal of all terms for a taxonomy
| Reported by: | maxcutler | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | XML-RPC | Version: | 3.4 |
| Severity: | normal | Keywords: | has-patch |
| Cc: | Focuses: |
Description
wp.newPost and wp.editPost XML-RPC methods have a terms argument which allows setting of the terms associated with the post. This argument is an array with taxonomy names as keys and arrays of term IDs as values.
If a taxonomy is explicitly supplied with an empty list of IDs, the expectation is that this would cause removal of all currently-associated terms in that taxonomy from the post.
For example, if a post has 'Cat A' and 'Cat B' associated with it, passing array( 'category' => array() ) should cause both of those categories to be unassociated with the post.
This issue has existed since I wrote this code back in 3.4.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Added patch with unit test.