WordPress.org

Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #22335, comment 2


Ignore:
Timestamp:
10/31/12 17:49:08 (3 years ago)
Author:
DaEnno
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #22335, comment 2

    initial v1  
    1 You can't upload an image with the post status 'inherit'. Of course, the parent will be created after the image is uploaded. 
    2 That's why the initial "post_status" of an image is "draft". 
     1You can't upload an image with the post status ''inherit''. Of course, the parent will be created after the image is uploaded. 
     2That's why the initial ''post_status'' of an image is ''draft''. 
    33 
    4 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". 
     4This is the point where the ''attach_uploads'' function should be doing it's job properly by setting the image's ''post_status'' to ''inherit''. 
    55 
    6 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''. 
    7 You can see this in the function "mw_editPost", starting with 
     6When 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''. 
     7You can see this in the function ''mw_editPost'', starting with 
    88 
    99{{{