Manage post_status via XML-RPC
|Reported by:||josephscott||Owned by:||westi|
The post_status field is now exposed via XML-RPC methods, we need a way to set it as well. To that end this ticket addresses the following items:
- Hide the 'future' post_status from posts, expose them as 'publish' instead
- Look for a 'post_status' field in metaWeblog.newPost and metaWeblog.editPost and use it, overriding the publish argument
- Add new wp.getPostStatusList and wp.getPageStatusList methods
The future post_status is an internal status only, so to make sure that clients don't get confused by posts that have a status of 'future' by sending it as published. This matches what a user would see for a future post in wp-admin.
If we find a 'post_status' field in metaWeblog.newPost or metaWeblog.editPost then check that has a value of 'draft', 'private', 'publish', 'pending' and if so then override the publish argument with the value in the 'post_status' field. We do the same thing for pages, with the exception that 'pending' isn't a valid status for a page.
Clients need a way to know what the valid statuses are for posts and pages, so wp.getPostStatusList and wp.getPageStatusList each return an array, with each item in the array being a valid post_status.
Change History (13)
- Owner changed from anonymous to westi
- Status changed from new to assigned