[wp-trac] [WordPress Trac] #29215: WP_Customize_Media_Control
WordPress Trac
noreply at wordpress.org
Mon Jan 12 03:44:46 UTC 2015
#29215: WP_Customize_Media_Control
-------------------------------------+------------------
Reporter: celloexpressions | Owner:
Type: feature request | Status: new
Priority: normal | Milestone: 4.2
Component: Customize | Version: 3.5
Severity: normal | Resolution:
Keywords: has-patch needs-testing | Focuses:
-------------------------------------+------------------
Changes (by celloexpressions):
* keywords: needs-patch => has-patch needs-testing
* milestone: Future Release => 4.2
Comment:
[attachment:29215.diff] implements a new base class for all Customizer
media controls: `WP_Customize_Media_Control`. It's actually just the
current `WP_Customize_Upload_Control` with things that are only there for
back-compat (from 4.1) pulled out and with a couple of key changes so that
it used settings that store attachment ids instead of URLs.
`WP_Customize_Upload_Control` is then subclassed from the new media
control, and contains the extracted back-compat and adjustments to make
associated settings store URLs instead of attachment ids. There are no
functional changes to the upload control or any of its sub-controls.
We could theoretically create a whole tree of sub-controls directly under
the media control like the upload control currently has. But
`WP_Customize_Image_Control` is completely unnecessary now (just specify
the `mime_type` arg as `image` in the upload or media control), so I don't
think we should bother. Note that the default value of settings associated
with `WP_Customize_Media_Control` is still a URL, since it wouldn't make
sense to support attachment ids here.
The CSS changes here are obviously absurd, see #30713 and #30618.
I think we should probably retain the existing @since values in what is
now `WP_Customize_Media_Control` rather than changing them all to 4.2, but
could see it making sense to change them.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/29215#comment:7>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list