[wp-xmlrpc] exposing draft posts and listing all posts

Joseph Scott joseph at randomnetworks.com
Wed Jul 9 23:06:41 GMT 2008


On Jul 9, 2008, at 3:14 PM, Daniel Jalkut wrote:

> Hi Joseph - just a quick note - I haven't taken time to read  
> through your post yet and I'm out the door.
>
> But I wanted to chime in to possibly clarify a problem in your  
> premise. In my experience the draft post does get exposed by  
> XMLRPC. I think the problem you're running into is that there's a  
> bug in the wp-admin interface that causes draft posts to receive a  
> "nil" date. This causes them to sort all the way to the bottom of  
> the getRecentPosts array, and if you have many posts, virtually  
> guarantees they won't show up in the recent posts response.


Drafts are essentially always going to the oldest posts in your blog  
because they are dated 0000-00-00 (why MySQL even allows such a date,  
ug, that's another story).

I'm not sure that it's a bug though.  Those are date fields generally  
relate to published times, but we do have the post_modified/ 
post_modified_gmt fields that could be used.  I guess what I should  
have asked is, would changing the sort to be by post_modified_gmt  
instead of post_date (published date) be ok?  Or do you think that  
this would confuse the situation for blog clients?

--
Joseph Scott
joseph at randomnetworks.com
http://joseph.randomnetworks.com/






More information about the wp-xmlrpc mailing list