[wp-trac] [WordPress Trac] #18429: Create custom post types via XMLRPC

WordPress Trac wp-trac at lists.automattic.com
Wed Feb 1 17:38:01 UTC 2012


#18429: Create custom post types via XMLRPC
----------------------------+------------------------
 Reporter:  nprasath002     |       Owner:  westi
     Type:  task (blessed)  |      Status:  reviewing
 Priority:  normal          |   Milestone:  3.4
Component:  XML-RPC         |     Version:
 Severity:  normal          |  Resolution:
 Keywords:  has-patch       |
----------------------------+------------------------

Comment (by nacin):

 > I know mw_newPost uses get_default_post_to_edit to get an auto-draft to
 work on before calling wp_insert_post, but I'm wondering if that's
 something we really want to copy. Auto-drafts get cleaned out after seven
 days, but that can leave a significant amount of cruft behind in the
 meantime if wp_insert_post fails.

 We'll probably move that off to cron cleanup at some point (#19663), but
 either way, don't worry about garbage collection for auto-drafts, as
 that's a general core quirk, and not something XML-RPC should work around.

 get_default_post_to_edit() is necessary in part so you do not publish a
 post before attaching all of the associated data, in particular taxonomies
 and post formats.

 See #18812 for XML-RPC-specific reasons for why get_default_post_to_edit()
 is now used here, and see #16192 for how this was a bug in Press This.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/18429#comment:25>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list