[wp-trac] [WordPress Trac] #36916: Refactor EditAttachments frame to work outside Media Library admin page

WordPress Trac noreply at wordpress.org
Mon May 23 14:16:08 UTC 2016


#36916: Refactor EditAttachments frame to work outside Media Library admin page
---------------------------------+-----------------------------------------
 Reporter:  Funkatronic          |       Owner:
     Type:  enhancement          |      Status:  new
 Priority:  normal               |   Milestone:  Awaiting Review
Component:  Media                |     Version:  4.5.2
 Severity:  normal               |  Resolution:
 Keywords:  has-patch needs-     |     Focuses:  javascript, administration
  testing                        |
---------------------------------+-----------------------------------------

Comment (by Funkatronic):

 Thank for the reply @adamsilverstein.  So I help out with the Meta Box
 Plugin and  we have a few media based fields; one that a user selects
 files in general, one that user selects images and now I'm working on ones
 that do videos and audio.  Each attachment chosen has a link to the admin
 page of that attachment but I just added the ability to use the
 `EditAttachments` modal.  It keeps the user on the same page and allows
 them to edit the metadata of the attachments if and when needed, as well
 as giving them a larger preview of the attachment, in the case of images
 and videos.  Only problem is that to make it work, I have to feed it a
 dummy router that has noop functions so that it even opens outside the
 media library page. I don't need a router for a meta box but the modal is
 very handy. The code I refactored hooks to the same events the original
 function calls were inside, so it should and does work.  Haven't had any
 issues with the urls the router creates; it opens up the right attachments
 when navigated.

 The other issue with the videos being deleted was a dealbreaker and it
 forced me to extend two views to make it not do that.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/36916#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list