[wp-trac] [WordPress Trac] #22085: Correctly assign post_parent to uploaded attachments in the new media modal

WordPress Trac noreply at wordpress.org
Fri Oct 19 03:28:39 UTC 2012


#22085: Correctly assign post_parent to uploaded attachments in the new media modal
--------------------------+--------------------
 Reporter:  koopersmith   |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  3.5
Component:  Media         |     Version:  trunk
 Severity:  normal        |  Resolution:
 Keywords:                |
--------------------------+--------------------

Comment (by deltafactory):

 One way or another, it looks like the post_id parameter needs to be passed
 during the upload-attachment action. One possibility is to set it during
 the upload handler, but that requires finding the ID stored in a global
 variable. The old uploader used a quick script snippet that put it in the
 global `post_id`.

 One possible solution: add a filter that adds it to the plupload settings.
 This potentially conflicts with other plugins that want to use plupload in
 different ways elsewhere on the page, so this may be a bad solution. The
 actual add_filter could be placed on the individual pages where it's
 useful, instead of in media.php.

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


More information about the wp-trac mailing list