Opened 13 years ago
Closed 12 years ago
#18431 closed task (blessed) (fixed)
Delete custom posts via XMLRPC
Reported by: | nprasath002 | Owned by: | westi |
---|---|---|---|
Milestone: | 3.4 | Priority: | normal |
Severity: | normal | Version: | |
Component: | XML-RPC | Keywords: | has-patch |
Focuses: | Cc: |
Description (last modified by )
Simple API to support deletion of a single post of any CPT over xmlrpc.
Attachments (2)
Change History (11)
#1
@
13 years 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)
#2
follow-up:
↓ 4
@
13 years 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
#4
in reply to:
↑ 2
;
follow-up:
↓ 6
@
13 years ago
- 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.
#6
in reply to:
↑ 4
@
13 years ago
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.