[wp-trac] [WordPress Trac] #17578: Merge media buttons into one
WordPress Trac
wp-trac at lists.automattic.com
Thu Sep 29 23:10:33 UTC 2011
#17578: Merge media buttons into one
------------------------------------+------------------
Reporter: mitchoyoshitaka | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 3.3
Component: Administration | Version:
Severity: trivial | Resolution:
Keywords: has-patch dev-feedback |
------------------------------------+------------------
Changes (by nacin):
* keywords: has-patch 3.4-early => has-patch dev-feedback
Comment:
Attached patch:
* Stubs media_buttons(). We are now using the generic 'media' button
(which is type = 'file'). I switched to the video image for now as it
looks better. Per IRC, we should steal the image from the Media Library
screen/menu icon.
* Removes media_upload_audio(), media_upload_video(), and
media_upload_file(). These can be stubbed to wrap media_upload_image().
* Removes type_url_form_video(), type_url_form_audio(), and
type_url_form_file(). These can be stubbed to wrap type_url_form_image().
* media_upload_type_url_form(), which is the "Insert from URL" form, is
the only thing that actually needed any changes. Here, we now have radio
buttons that default to "Image" insertion, and allow for "Audio, Video, or
Files." Dead-simple jQuery toggles which fields to show. This dates back
to crazyhorse, according to jane.
* Replaces the callbacks for the media_upload_audio, media_upload_video,
and media_upload_file hooks to be media_upload_image(), to ensure some
compatibility when type=audio, type=video, or type=file is requested. (It
will take basically no work to also ensure that such links will result in
the image fields being hidden by default.)
* Removes the old add_action( 'async_upload_*' ) calls, which are from
pre-plupload.
* Removes mu_media_buttons from network settings and code.
Probably needs some tweaking based on other things we find, but it's
pretty solid as-is, and handles the merger quite elegantly indeed. I will
say though, my original diff will never see the light of day. It was much
easier the second time around.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/17578#comment:10>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list