[wp-trac] [WordPress Trac] #29723: Media: extract attachment-preview logic from attachment-details-two-column template
WordPress Trac
noreply at wordpress.org
Mon Sep 22 03:30:39 UTC 2014
#29723: Media: extract attachment-preview logic from attachment-details-two-column
template
------------------------------+-------------------------
Reporter: celloexpressions | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: 4.1
Component: Media | Version: 4.0
Severity: normal | Keywords: needs-patch
Focuses: javascript |
------------------------------+-------------------------
For #21483, we'd like to display media attachments previews in the
Customizer controls UI after an attachment has been selected from the
media modal. As this applies to both WP_Customize_Upload control and
WP_Customize_Image_Control, we would ideally leverage the existing logic
that displays either the selected image, an audio/video upload preview, or
the appropriate file type icon. Currently this functionality exists for
the media library grid view details modal, but it is within a template
that also prints the attachment details UI (`attachment-details-two-
column` template).
I'm supplying a basic patch to convey this a bit more clearly, but I'm not
familiar with best practices for how this would be implemented in the JS
side, so I'll leave formal patching to someone more familiar with this
code.
This is a dependency for #21483 now, unless it would be better to just
duplicate the logic there... but I'm guessing that's not a great idea.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/29723>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list