Ticket #4982 (closed defect: fixed)

Opened 1 year ago

Last modified 1 year ago

XMLRPC should expose draft status of entries

Reported by: redsweater Assigned to: westi
Priority: normal Milestone: 2.5
Component: XML-RPC Version: 2.3
Severity: normal Keywords: has-patch
Cc: redsweater, josephscott

Description

Although getRecentPosts returns items whose publish status is "draft," there is no indication in the XML attributes of the status of the item. This leaves remote clients in a tricky position when it comes to relating the status of the post to the user.

I propose a new boolean attribute "wp_draft" be added to these posts, to definitely convey whether the post is a draft or not.

Attachments

xmlrpc.php.diff (0.8 kB) - added by josephscott on 11/09/07 00:15:16.

Change History

09/15/07 20:17:13 changed by foolswisdom

  • version set to 2.3.
  • milestone set to 2.4.

09/17/07 16:04:05 changed by josephscott

  • cc changed from redsweater to redsweater, josephscott.

09/17/07 16:12:12 changed by josephscott

Would it be helpful to know the other possible states? Ryan mentioned 5: http://boren.nu/archives/2007/09/05/post-status-transitions/

  • publish
  • draft
  • private
  • future
  • pending

09/17/07 17:04:16 changed by Nazgul

See also:

http://trac.wordpress.org/browser/trunk/wp-admin/includes/schema.php?rev=6075#L103

Not all of those are applicable to posts though.

09/17/07 22:52:38 changed by ryan

Most of those are legacy. Only inherit is still used among those in the schema but not in my list, and it really isn't a public status.

09/17/07 22:59:15 changed by Nazgul

If they're legacy, can't we take them out?

09/18/07 02:49:46 changed by josephscott

In -trunk I see the following potential post status values for a post:

  • draft
  • private
  • pending
  • publish
  • future

For pages there are the following potential values:

  • draft
  • private
  • publish

There were all the possible states I was able to put posts and pages in using the regular web admin. Does this seem like a reasonable list?

11/09/07 00:15:16 changed by josephscott

  • attachment xmlrpc.php.diff added.

11/09/07 00:17:11 changed by josephscott

The diff adds the 'post_status' field to data returned from metaWeblog.getPost and metaWeblog.getRecentPosts. Just as a note, wp.getPage already provides this for pages in the 'page_status' field.

11/09/07 00:33:15 changed by josephscott

  • keywords set to has-patch.

11/28/07 20:55:20 changed by westi

  • owner changed from anonymous to westi.
  • status changed from new to assigned.

12/05/07 07:42:42 changed by westi

  • status changed from assigned to closed.
  • resolution set to fixed.

(In [6358]) Expose post_status over xmlrpc. Fixes #4982 props josephscott