[wp-trac] [WordPress Trac] #21483: Refactor Customizer Upload, Image, and Background Image controls to leverage the media library/modal

WordPress Trac noreply at wordpress.org
Mon Sep 22 04:04:39 UTC 2014


#21483: Refactor Customizer Upload, Image, and Background Image controls to
leverage the media library/modal
-------------------------------------+-----------------------------
 Reporter:  jjonesftw                |       Owner:
     Type:  enhancement              |      Status:  new
 Priority:  normal                   |   Milestone:  4.1
Component:  Customize                |     Version:  3.5
 Severity:  normal                   |  Resolution:
 Keywords:  has-patch needs-testing  |     Focuses:  ui, javascript
-------------------------------------+-----------------------------

Comment (by celloexpressions):

 For control-previewing we should leverage the logic that's used in the
 media library grid view details modal. That's currently housed within a JS
 template that also does the UI for the other fields, so I've created
 #29723 to extract it to facilitate re-use. If anyone's well-versed in the
 media library's (Backbone) architecture, please take a formal stab at
 that.

 Once that's in place, we should be able to leverage
 `attachment_url_to_post_id()` to locate the necessary data for this
 template when re-opening the Customizer to display an existing attachment.
 We can of course just pass it over from the media modal when selecting a
 new file. The biggest restriction with all of this is that we can only
 save the file URL as the control's setting's value.

 I'd also like to fully leverage #29572, so I'm going to hold off on
 continued iterations here until those two things are in core. Anyone
 following along, please test/patch/leave feedback on/help move along
 #29723 and #29572 so that we can get back to this sooner rather than
 later.

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


More information about the wp-trac mailing list