[wp-trac] [WordPress Trac] #40427: Expose a JavaScript API to extend the Media Manager

WordPress Trac noreply at wordpress.org
Tue May 2 21:53:05 UTC 2017


#40427: Expose a JavaScript API to extend the Media Manager
---------------------------+------------------------------
 Reporter:  jonathanbardo  |       Owner:
     Type:  enhancement    |      Status:  new
 Priority:  normal         |   Milestone:  Awaiting Review
Component:  Media          |     Version:  trunk
 Severity:  normal         |  Resolution:
 Keywords:                 |     Focuses:  javascript
---------------------------+------------------------------

Comment (by dglingren):

 I am very excited to see this ticket and the prospect of a better way to
 work with and extend the Media Manager. My plugin (Media Library
 Assistant), like many others, adds features to the Media Manager and I
 have found it a very frustrating experience. My JavaScript skills lag well
 behind my PHP skills, but I know that a better API would be a big
 improvement.

 Here are the kinds of changes I've made:

 1. Add one or more controls to the toolbar. For example, a dropdown
 control to filter the attachments by taxonomy term (my plugin adds
 taxonomy support to attachments).
 2. Modify or replace an existing toolbar control. For example, add more
 choices to the MIME Type "views" dropdown control.
 3. Add elements to the "query attachments" action and submit a new query
 when an element's value has changed.
 4. Add or replace elements in the ATTACHMENT DETAILS pane (some support
 exists). For example, replace the text box controls for taxonomies with
 true meta boxes like those in the full screen Media/Edit Media submenu.
 5. Supply initial/default values for the Alignment, Link to and Size
 controls in the ATTACHMENT DETAILS pane.

 Adding/changing the toolbar has been a real challenge because several
 plugins do it and there is no way to coordinate the results, especially in
 a "responsive" way that adapts to changing browser window width.

 Here are changes I have not been able to make:

 1. Change the sort order of the items in the attachments returned from the
 query and in the attachments browser window. The sort order is hard-coded
 in the script (or was the last time I checked).
 2. Change the information displayed in the attachments browser window.
 I've had very well-reasoned support requests for this, proposing more of a
 "list view" with something other than thumbnail images to identify items.
 3. Change the toolbar controls on the "Create Gallery" or "Set Featured
 Image" windows. Unlike the main "Add Media" window, toolbar controls for
 these windows are hard-coded.

 I'm happy to help in any way I can and I look forward to the results of
 this important effort. Thanks for undertaking it!

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


More information about the wp-trac mailing list