Opened 21 months ago
Closed 14 months ago
#18431 closed task (blessed) (fixed)
Delete custom posts via XMLRPC
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Priority: | normal | Milestone: | 3.4 |
| Component: | XML-RPC | Version: | |
| Severity: | normal | Keywords: | has-patch |
| Cc: | max@…, jbernal@… |
Description (last modified by westi)
Simple API to support deletion of a single post of any CPT over xmlrpc.
Attachments (2)
Change History (11)
nprasath002 — 21 months ago
- Description modified (diff)
- Keywords needs-patch added; has-patch removed
- Milestone changed from Awaiting Review to 3.4
- Owner set to westi
- Status changed from new to reviewing
- Type changed from feature request to task (blessed)
nprasath002 — 16 months ago
comment:2
follow-up:
↓ 4
nprasath002 — 16 months ago
The patch fixed the issues mentioned above
I dont think we need to have blog_id here.
Just id of a post is enough to delete even in a multisite.
Correct if i am wrong
comment:3
nprasath002 — 16 months ago
- Keywords has-patch added; needs-patch removed
- Cc max@… added
Replying to nprasath002:
I dont think we need to have blog_id here.
Just id of a post is enough to delete even in a multisite.
While technically true, it should still follow the convention that other methods use. In fact, none of the methods actually use the blog_id parameter, but to remove it on some methods and not others is probably not a good idea.
Whitespace issues aside, the new patch looks good.
Replying to maxcutler:
While technically true, it should still follow the convention that other methods use. In fact, none of the methods actually use the blog_id parameter, but to remove it on some methods and not others is probably not a good idea.
Yes, please stick to (blog_id, username, password) as first parameters as much as possible. It's already enough of a mess.
Example:
- wp.newPage (username,password,...)
- wp.deletePage (blog_id,username,password,page_id)
- wp.editPage (blog_id,page_id,username,password,...)
- wp.getPage (blog_id,page_id,username,password)
That means instead of clients reusing code to build a common set of parameters, you have to take it case by case.

Marking this as a Blessed Task for 3.4 - This is part of the first iteration of XML-RPC new features we will be working on.
There are a number of issues with this current patch:
We should have a simple wp.deletePost which mimics wp.deletePage but supports all CPTs (and then we can probably re-work wp.deletePage to call it.