[wp-trac] [WordPress Trac] #22335: XML-RPC: attach_uploads does not set post_status 'inherit'

WordPress Trac noreply at wordpress.org
Wed Oct 31 17:43:59 UTC 2012


#22335: XML-RPC: attach_uploads does not set post_status 'inherit'
--------------------------+------------------------------
 Reporter:  DaEnno        |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  XML-RPC       |     Version:
 Severity:  normal        |  Resolution:
 Keywords:                |
--------------------------+------------------------------

Comment (by DaEnno):

 You can't upload an image with the post status 'inherit'. Of course, the
 parent will be created after the image is uploaded.
 That's why the initial "post_status" of an image is "draft".

 This is the point where the "attach_uploads" function should be doing it's
 job properly by setting the image's "post_status" to "inherit".

 When I first recognized this I thought I could get around it by setting
 the image's post status afterwards via "wp.editPost". Unfortunately this
 doesn't work either. This is due to some switch-statement where 'inherit'
 is not included for the "post_status", so it defaults to ''draft''.
 You can see this in the function "mw_editPost", starting with

 {{{
 switch( $content_struct["{$post_type}_status"] ) {
 }}}

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


More information about the wp-trac mailing list