Commit Graph

249 Commits

Author SHA1 Message Date
Andrea Fercia
f57e10a35d Accessibility: Fix the order of the Previous, Next, and Close buttons in the Attachment Details modal.
Making the visual and DOM order match benefits keyboard users who navigate documents sequentially and expect the focus order to be consistent with the sequential reading order.

Fixes #47458.

Built from https://develop.svn.wordpress.org/trunk@45506


git-svn-id: http://core.svn.wordpress.org/trunk@45317 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-06-09 15:48:53 +00:00
Andrea Fercia
6a9bcaeaa9 Accessibility: Improve accessibility of all the media views form controls.
- changes the media views form controls to have explicitly associated labels with for/id attributes
- adds a few missing labels / aria-labels
- improves a few existing labels / aria-labels
- improves semantics in a few places, by adding visually hidden headings, fieldset + legend elements, aria-describedby attributes
- improves the image custom size input fields and their labelling
- adds `role="status"` to the "saved" indicator so that status messages are announced to assistive technologies
- swaps the columns source order in the image details template, to make visual and DOM order match
- swaps the "Replace" and "Back" buttons source order in the Replace Image view, to make visual and DOM order match
- gallery settings: move checkbox label to the right: checkboxes are supposed to have labels on the right
- merge similar strings, unified to "Drop files to upload" (removed "Drop files here", and "Drop files anywhere to upload")
- makes the "upload-ui" consistent across the media views
- hides the IE 11 "X" `::-ms-clear` button in the Insert from URL field, as it conflicts with the uploading spinner
- adds comments to all the media templates to clarify their usage
- slightly increases vertical spacing between form fields in the media sidebar
- removes some CSS selectors introduced as backwards compatibility for WordPress pre-4.4
- removes some CSS still targeting Internet Explorer 7 and 8

Fixes #47141.
Fixes #47122.

Built from https://develop.svn.wordpress.org/trunk@45499


git-svn-id: http://core.svn.wordpress.org/trunk@45310 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-06-07 20:45:02 +00:00
Sergey Biryukov
b29ef22665 Media: Correct closing </label> tags in #tmpl-audio-details and #tmpl-video-details after [42444].
Props TravisSeitler.
Fixes #47355.
Built from https://develop.svn.wordpress.org/trunk@45381


git-svn-id: http://core.svn.wordpress.org/trunk@45192 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-05-23 00:49:53 +00:00
Sergey Biryukov
4236a3522d I18N: Avoid using placeholders for link start and end tags in alt text description strings added in [45158].
Use an established pattern of moving additional link attributes out of the translatable string.

Props dimadin.
Fixes #47159.
Built from https://develop.svn.wordpress.org/trunk@45334


git-svn-id: http://core.svn.wordpress.org/trunk@45145 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-05-17 00:53:54 +00:00
Gary Pendergast
33c82208a2 Media: Remove an extra verb context missed in [45147].
Props garrett-eclipse.
See #44675.


Built from https://develop.svn.wordpress.org/trunk@45153


git-svn-id: http://core.svn.wordpress.org/trunk@44962 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-04-09 03:59:51 +00:00
Gary Pendergast
4b1ff1c298 Media: Update the media bulk action labels for consistency.
Props ianbelanger, garrett-eclipse, afercia, Presskopp.
Fixes #44675.


Built from https://develop.svn.wordpress.org/trunk@45147


git-svn-id: http://core.svn.wordpress.org/trunk@44956 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-04-08 23:54:52 +00:00
Andrea Fercia
7bedcf0bee Accessibility: Improve the "Alt text" description.
Moves the word "Describe" within the link.

Amends [44900].
See #41612.

Built from https://develop.svn.wordpress.org/trunk@45038


git-svn-id: http://core.svn.wordpress.org/trunk@44847 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-27 18:47:51 +00:00
Andrea Fercia
e9db7c48d2 Accessibility: improve the "URL" and "Alt text" fields in the media modals.
Many users found the attachment URL field confusing: it says "URL" so it may appear like a field meant to paste a URL into.
Also, the Alt text field is the most important one in terms of content, while the Title field needs to be de-emphasized.

- changes the URL field label to "Copy link"
- moves the alt text field to the top as first field 
- avoids to set initial focus on the alt text field 
- adds an explanatory text with a link pointing to the W3C "alt decision tree" tutorial 
- adds `aria-describedby` to target the explanatory text
- adjusts the CSS accordingly
- updates the QUnit index.html file

Props melchoyce, audrasjb, afercia.
Fixes #41612.

Built from https://develop.svn.wordpress.org/trunk@44900


git-svn-id: http://core.svn.wordpress.org/trunk@44731 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-15 10:43:51 +00:00
Aaron Jorbin
99836a26c2 PHPCS: Fix errors
Fix errors introduced in [43973] due to Jorbin not running the correct tag of wpcs.

Unprops jorbin.


Built from https://develop.svn.wordpress.org/trunk@43976


git-svn-id: http://core.svn.wordpress.org/trunk@43808 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-11 04:45:23 +00:00
Aaron Jorbin
8169b49e75 REST API: Persist attributes for attachment links
In [43437], the link definition implementation caused attachment links to be unexpectedly nested under an attributes key. This changeset restores the prior behavior.

Merges [43681] to trunk.

Props TimothyBlynJacobs, danielbachhuber.
Fixes #44750.

Built from https://develop.svn.wordpress.org/trunk@43973


git-svn-id: http://core.svn.wordpress.org/trunk@43805 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-11 04:01:26 +00:00
Adam Silverstein
e71a3d6193 Media: Improve display and accessibility of meta data in detail view.
* Add a `human_readable_duration` function including tests.
* Add 'pixels' after image width/height.
* Add screen reader text for durations.

Props Presskopp, kiranpotphode, milindmore22, stormrockwell, afercia.
Fixes #39667. 


Built from https://develop.svn.wordpress.org/trunk@43633


git-svn-id: http://core.svn.wordpress.org/trunk@43462 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-09-08 04:20:24 +00:00
John Blackbourn
61ba015b0f Media: Ensure the "Edit more details" link in the attachment details modal always points to the correct editing URL.
Fixes #44620

Built from https://develop.svn.wordpress.org/trunk@43601


git-svn-id: http://core.svn.wordpress.org/trunk@43430 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-08-31 10:51:24 +00:00
Gary Pendergast
56c162fbc9 Coding Standards: Upgrade WPCS to 1.0.0
WPCS 1.0.0 includes a bunch of new auto-fixers, which drops the number of coding standards issues across WordPress significantly. Prior to running the auto-fixers, there were 15,312 issues detected. With this commit, we now drop to 4,769 issues.

This change includes three notable additions:
- Multiline function calls must now put each parameter on a new line.
- Auto-formatting files is now part of the `grunt precommit` script. 
- Auto-fixable coding standards issues will now cause Travis failures.

Fixes #44600.


Built from https://develop.svn.wordpress.org/trunk@43571


git-svn-id: http://core.svn.wordpress.org/trunk@43400 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-08-17 01:51:36 +00:00
Andrea Fercia
d6a73ef110 Media: avoid page scrolling when opening the media modal.
Moves focus to a proper element within the media modal to avoid the underlying
page to scroll to the bottom. Removes the media modal `freeze` option.

Props andreiglingeanu, adamsilverstein.
Fixes 39859.

Built from https://develop.svn.wordpress.org/trunk@42624


git-svn-id: http://core.svn.wordpress.org/trunk@42453 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-31 17:03:33 +00:00
Andrea Fercia
3fb8eee9fc Accessibility: Media: Improve the usage of a few label elements in the media templates.
Label elements should only be used for labelable elements.
- `Uploaded By` and `Uploaded To` aren't form controls and shouldn't be associated with labels
- changes the labels for media source, alternate sources, poster image, and tracks to solve a layout issue and explicitly associate the labels to their form fields (previously, the labels were wrapping also the Remove buttons)

Props Presskopp, afercia.
Fixes #38759, #40468.

Built from https://develop.svn.wordpress.org/trunk@42444


git-svn-id: http://core.svn.wordpress.org/trunk@42274 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-14 16:39:47 +00:00
Gary Pendergast
aaf99e6913 Code is Poetry.
WordPress' code just... wasn't.
This is now dealt with.

Props jrf, pento, netweb, GaryJ, jdgrimes, westonruter, Greg Sherwood from PHPCS, and everyone who's ever contributed to WPCS and PHPCS.
Fixes #41057.


Built from https://develop.svn.wordpress.org/trunk@42343


git-svn-id: http://core.svn.wordpress.org/trunk@42172 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-30 23:11:00 +00:00
Sergey Biryukov
320c289ec0 Media: Set correct value for "Link Rel" field in Image Details modal.
Props hazemnoor.
Fixes #41764.
Built from https://develop.svn.wordpress.org/trunk@41325


git-svn-id: http://core.svn.wordpress.org/trunk@41156 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-31 11:17:45 +00:00
Weston Ruter
31d4d81039 Widgets: Introduce media widgets for images, audio, and video with extensible base for additional media widgets in the future.
The last time a new widget was introduced, Vuvuzelas were a thing, Angry Birds started taking over phones, and WordPress stopped shipping with Kubrick. Seven years and 17 releases without new widgets have been enough, time to spice up your sidebar!

Props westonruter, melchoyce, obenland, timmydcrawford, adamsilverstein, gonom9, wonderboymusic, Fab1en, DrewAPicture, sirbrillig, joen, matias, samikeijonen, afercia, celloexpressions, designsimply, michelleweber, ranh, kjellr, karmatosed.
Fixes #32417, #39993, #39994, #39995.

Built from https://develop.svn.wordpress.org/trunk@40640


git-svn-id: http://core.svn.wordpress.org/trunk@40501 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-11 21:11:44 +00:00
Andrea Fercia
88e515fac0 Accessibility: Improve the suggested image size text in the media views.
Adds `pixels` as unit, avoiding abbreviation for a clearer pronunciation by screen
readers. Also, adds the word `by` instead of the special character `times`.

Props Presskopp, stormrockwell.
Fixes #38932.

Built from https://develop.svn.wordpress.org/trunk@40573


git-svn-id: http://core.svn.wordpress.org/trunk@40443 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-05-05 23:29:44 +00:00
Andrea Fercia
9c360b1ab8 Administration: Fix minor misalignments caused by the button-link CSS class.
After [40059] the CSS class `button-link` uses `text-align: left` by default.
This change now requires to limit as much as possible the use of `button-link`
to controls that should really look like links and to explicitly set
`text-align: center` in a few other cases.

Fixes #39983.

Built from https://develop.svn.wordpress.org/trunk@40358


git-svn-id: http://core.svn.wordpress.org/trunk@40265 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-03-31 16:51:45 +00:00
Andrea Fercia
d33301821b Buttons: Improve the .button-link CSS class for link-like buttons.
Updates `.button-link` adding color and underline to make link-like buttons look
like links by default. Introduces `.button-link-delete` as a modifier, stackable
CSS class for red button-links.

Props Cheffheid, afercia.

See #34242.
Fixes #35126.

Built from https://develop.svn.wordpress.org/trunk@40052


git-svn-id: http://core.svn.wordpress.org/trunk@39989 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-02-09 16:47:44 +00:00
John Blackbourn
80a839de13 Docs: Misc corrections and additions to inline documentation.
See #39130
Props keesiemeijer

Built from https://develop.svn.wordpress.org/trunk@39639


git-svn-id: http://core.svn.wordpress.org/trunk@39579 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-12-27 09:28:40 +00:00
Helen Hou-Sandí
81f9cc26a1 Media: Clearly indicate that PDF thumbnails are just document previews.
This helps affirm that your upload is fine, and has not been reduced down to the first page or changed into an image. This applies to the attachment details modal in the media library, where media is also now centered in the preview area.

props folletto, helen.
fixes #38717.

Built from https://develop.svn.wordpress.org/trunk@39213


git-svn-id: http://core.svn.wordpress.org/trunk@39153 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-13 16:39:31 +00:00
Mike Schroder
a8e304ec8e Media: Add support for rendering PDF thumbnails.
When support for PDFs is available, on upload,
render 'Thumbnail', 'Medium', 'Large', and 'Full' sizes of
the first page, and save them in attachment meta.

Use these renders within Add Media, Media Gallery and List views,
Attachment Details, Post/Attachment Edit screens, and Attachment pages.

Support available by default via Imagick -> ImageMagick -> Ghostscript,
but can be provided by any `WP_Image_Editor` that supports PDFs.

Props adamsilverstein, azaozz, celloexpressions, desrosj, dglingren, ericlewis, ipstenu, joemcgill, joyously, markoheijnen, melchoyce, mikeschroder, tomauger.
Fixes #31050.
Built from https://develop.svn.wordpress.org/trunk@38949


git-svn-id: http://core.svn.wordpress.org/trunk@38892 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-26 07:28:32 +00:00
Scott Taylor
0eebbed6b2 General: revert [38467], wp_is_IE() should not exist.
See #37699.

Built from https://develop.svn.wordpress.org/trunk@38468


git-svn-id: http://core.svn.wordpress.org/trunk@38409 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-31 15:22:31 +00:00
Scott Taylor
021e23e70b General: use a new function, wp_is_IE(), instead of the $is_IE global in a number of places.
See #37699.

Built from https://develop.svn.wordpress.org/trunk@38467


git-svn-id: http://core.svn.wordpress.org/trunk@38408 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-31 06:42:33 +00:00
John Blackbourn
dbdc1c28b1 I18N: Correct various instances of incorrect usage of esc_attr_e().
Fixes #37457
Props henry.wright, afercia

Built from https://develop.svn.wordpress.org/trunk@38424


git-svn-id: http://core.svn.wordpress.org/trunk@38365 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-28 18:06:30 +00:00
Dominik Schilling
4e66d6a568 Customize: Add a RTL version of "browser.png" for the site icon preview.
Props sidati.
Fixes #37063.
Built from https://develop.svn.wordpress.org/trunk@37963


git-svn-id: http://core.svn.wordpress.org/trunk@37904 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-05 11:32:29 +00:00
Andrea Fercia
85cac9d47e Customizer, Site Icon preview: improve alt attributes and text accessibility.
Props shahpranaf, TacoVerdo, afercia.

Fixes #36562.
Built from https://develop.svn.wordpress.org/trunk@37229


git-svn-id: http://core.svn.wordpress.org/trunk@37195 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-04-17 12:01:27 +00:00
Scott Taylor
e649fabb6a Accessibility: add missing alt attributes to a gaggle of <img>s.
Props afercia.
Fixes #34583.

Built from https://develop.svn.wordpress.org/trunk@35567


git-svn-id: http://core.svn.wordpress.org/trunk@35531 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-11-07 16:12:27 +00:00
Andrea Fercia
f014928b44 Media: Restore proper conditional statement broken after [35427].
Unprops afercia.
See #34273.
Built from https://develop.svn.wordpress.org/trunk@35463


git-svn-id: http://core.svn.wordpress.org/trunk@35427 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-30 22:06:24 +00:00
Andrea Fercia
db8b09c40d Media: Improve the headings hierarchy in the Media Views for better accessibility.
Fixes #34273.
Built from https://develop.svn.wordpress.org/trunk@35427


git-svn-id: http://core.svn.wordpress.org/trunk@35391 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-28 23:08:24 +00:00
Andrew Ozz
4cdddd401a TinyMCE:
- Sanitize and render HTML in captions when showing a gallery preview (wpView).
- Encode/escape HTML entered in the text field in the wpLink dialog.

Props iseulde, kraftbj, jnylen0, shawarkhan.
Fixes #32616.
Built from https://develop.svn.wordpress.org/trunk@35341


git-svn-id: http://core.svn.wordpress.org/trunk@35307 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-21 20:38:26 +00:00
Scott Taylor
2f0fc3b97d After [34048], restore the else statement for h (height of video) in wp_underscore_video_template().
See #33798.

Built from https://develop.svn.wordpress.org/trunk@34049


git-svn-id: http://core.svn.wordpress.org/trunk@34017 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-11 18:30:26 +00:00
Scott Taylor
4b4f08c7a0 In [30082], hardcoded heights were removed on the front end for videos rendered via shortcode. These values were not removed from the admin, which was an oversight.
See #33798.

Built from https://develop.svn.wordpress.org/trunk@34048


git-svn-id: http://core.svn.wordpress.org/trunk@34016 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-11 18:27:25 +00:00
Sergey Biryukov
f9e7fb306c Merge two similar strings.
Props dipesh.kakadiya.
Fixes #33777.
Built from https://develop.svn.wordpress.org/trunk@33998


git-svn-id: http://core.svn.wordpress.org/trunk@33967 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-10 10:59:27 +00:00
Scott Taylor
767dd35a47 Media:
When inserting an image into a post, the values in `wp.media.controller.Library` should not default to linking the image when no user settings are present.

The default display setting value for `link` is now `none`. User settings persist and will override or confirm this value based on user actions.

Props liljimmi, janhenckens, eherman24, wonderboymusic.
Fixes #31467.

Built from https://develop.svn.wordpress.org/trunk@33729


git-svn-id: http://core.svn.wordpress.org/trunk@33697 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-08-25 12:13:23 +00:00
Konstantin Obenland
3248497cf3 Site Icon: Add crop preview to the media modal.
* Monkey patches imgAreaSelect library to support touch events.
* Removes Settings version of Site Icon since it would have been the same flow.
* Removes default value for Customizer setting - there is no default favicon.

Fixes #16434.



Built from https://develop.svn.wordpress.org/trunk@33329


git-svn-id: http://core.svn.wordpress.org/trunk@33301 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-20 15:57:25 +00:00
Sergey Biryukov
fa1b659d29 Merge two class attributes in WP_Customize_Media_Control::content_template() and wp_print_media_templates().
props nicholas_io.
fixes #32896.
Built from https://develop.svn.wordpress.org/trunk@33090


git-svn-id: http://core.svn.wordpress.org/trunk@33061 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-06 14:19:26 +00:00
Sergey Biryukov
c99db2bc59 Media modal: Use better descriptive text for "Remove" buttons.
props afercia.
fixes #32792.
Built from https://develop.svn.wordpress.org/trunk@32972


git-svn-id: http://core.svn.wordpress.org/trunk@32943 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-27 14:51:26 +00:00
Scott Taylor
72bf48f0b9 In Media microtemplates after [32467], use <button> instead of <a> for several more non-links.
Props afercia.
Fixes #26550.

Built from https://develop.svn.wordpress.org/trunk@32952


git-svn-id: http://core.svn.wordpress.org/trunk@32923 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-26 05:01:24 +00:00
Scott Taylor
b30b08fd92 Refresh attachment links in the media modal are unneeded since bringing the image editor into it in [27445].
Props rommelxcastro.
Fixes #32550.

Built from https://develop.svn.wordpress.org/trunk@32909


git-svn-id: http://core.svn.wordpress.org/trunk@32880 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-22 21:33:26 +00:00
Andrew Nacin
a0f4e8e086 Media: Support title fields to be removed from attachments.
props antpb.
fixes #23932.

Built from https://develop.svn.wordpress.org/trunk@32773


git-svn-id: http://core.svn.wordpress.org/trunk@32744 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-14 20:33:26 +00:00
Scott Taylor
4bf8e158ec Fix doc blocks for media*.php
See #32444.

Built from https://develop.svn.wordpress.org/trunk@32609


git-svn-id: http://core.svn.wordpress.org/trunk@32579 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-05-26 19:23:25 +00:00
Helen Hou-Sandí
1e8a787aa1 Media: Visually align upload errors with other admin notices.
props sagarjadhav.
fixes #31874.

Built from https://develop.svn.wordpress.org/trunk@32506


git-svn-id: http://core.svn.wordpress.org/trunk@32476 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-05-15 16:19:26 +00:00
Scott Taylor
2251a28f1d In media-template.php, change a few <a href="#" class="button">s to <button type="button" class="button" ...>.
See #26550.

Built from https://develop.svn.wordpress.org/trunk@32467


git-svn-id: http://core.svn.wordpress.org/trunk@32437 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-05-09 06:07:25 +00:00
Andrew Ozz
60706015e1 Revert editing of video embed parameters in the media modal, [31620] and [31626] for now. Plan on revisiting in 4.3.
Props iseulde. Fixes #31139, fixes #32006.
Built from https://develop.svn.wordpress.org/trunk@32258


git-svn-id: http://core.svn.wordpress.org/trunk@32229 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-04-21 22:41:26 +00:00
Helen Hou-Sandí
42028327a2 Insert from URL: Make sure the link text is actually used.
Turns out there were more pieces to renaming the field.

props iseulde.
fixes #29476.

Built from https://develop.svn.wordpress.org/trunk@32055


git-svn-id: http://core.svn.wordpress.org/trunk@32034 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-04-06 18:25:27 +00:00
Scott Taylor
3630732523 Remove the JS part of [31619].
Fixes #6820.

Built from https://develop.svn.wordpress.org/trunk@31960


git-svn-id: http://core.svn.wordpress.org/trunk@31939 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-04-01 16:34:27 +00:00
Helen Hou-Sandí
b6393c9d77 Media: UI tweaks for Insert from URL.
"Title" field is now labeled as "Link Text", to reflect how it's actually used. It's also hidden whenever the embed is updating, to make it clearer that something is happening. Embed dimension fields are shown below the preview, much like image property fields are shown below.

fixes #29476, see #31139.

Built from https://develop.svn.wordpress.org/trunk@31642


git-svn-id: http://core.svn.wordpress.org/trunk@31623 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-06 15:03:25 +00:00
Scott Taylor
cc953717b7 Allow inline editing of width and height parameters while previewing an embed in the media modal:
* Use `wp.shortcode()` instead of manually constructing a shortcode in `views/embed/link`
* Allow a URL to transition to a shortcode (and vice versa) when returning an embed to TinyMCE
* In `WP_Embed`, store the last URL and last set of attributes requested in class properties
* `wp_ajax_parse_embed()`, allow `[embed]`s to have attributes. Return `attr` in the response.

This is a first pass to allow broad testing with recent MCE view changes. 

See #31139.

Built from https://develop.svn.wordpress.org/trunk@31620


git-svn-id: http://core.svn.wordpress.org/trunk@31601 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-05 06:00:26 +00:00
Scott Taylor
d3471e9850 Allow attachments to be Detached from their parent in media grid and list modes.
See #6820.

Built from https://develop.svn.wordpress.org/trunk@31619


git-svn-id: http://core.svn.wordpress.org/trunk@31600 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-05 05:35:28 +00:00
Andrew Ozz
b799bd8e33 TinyMCE: wpView improvements:
- Better structure, simpler "view" registration, better extensibility.
- Better inline documentation.
- Don't show a placeholder for pasted link until we know the link is "embeddable'.
And many more improvements. Props iseulde. See #31412.
Built from https://develop.svn.wordpress.org/trunk@31546


git-svn-id: http://core.svn.wordpress.org/trunk@31527 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-02-25 23:13:25 +00:00
Scott Taylor
952a5c9971 Support chromeless Vimeo via MEjs:
* Bump MediaElement script loader versions to 2.16.2 - missed in [30634], oops!
* Add `Froogaloop` to `js/mediaelement` scripts for Vimeo
* Check for Vimeo in the same locations that YouTube is checked
* Dynamically load Froogaloop script in admin when editing a TinyMCE view
* Edit MediaElement to call `mejs.$.extend` instead of `$.extend` in `mejs.HtmlMediaElementShim.createPlugin()`, since `$` is not available via WP's jQuery (I will report this upstream):
6f9a78e008/src/js/me-shim.js (L631)

Fixes #29267.

Built from https://develop.svn.wordpress.org/trunk@31016


git-svn-id: http://core.svn.wordpress.org/trunk@30997 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-12-31 20:41:24 +00:00
John Blackbourn
e93105ba9a Clarify the text for the 'Edit Selection' link when multiple media items are selected in the media manager.
Props adamsilverstein
See #24325

Built from https://develop.svn.wordpress.org/trunk@30685


git-svn-id: http://core.svn.wordpress.org/trunk@30675 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-12-01 04:15:23 +00:00
Scott Taylor
75d347b259 Add size to the UI for Gallery Settings in the media modal. Ensure that the TinyMCE view is refreshed when size changes.
Props richardmtl, noplanman, wonderboymusic.
Fixes #18143.

Built from https://develop.svn.wordpress.org/trunk@29779


git-svn-id: http://core.svn.wordpress.org/trunk@29551 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-09-29 03:45:16 +00:00
Sergey Biryukov
10e0807cce Add context for 'Trash' string in media modal.
props pavelevap.
fixes #29739.
Built from https://develop.svn.wordpress.org/trunk@29764


git-svn-id: http://core.svn.wordpress.org/trunk@29536 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-09-24 13:49:20 +00:00
Sergey Biryukov
0113d3457b Avoid PHP notices in media modal caused by orphaned attachments.
fixes #29566 for trunk.
Built from https://develop.svn.wordpress.org/trunk@29724


git-svn-id: http://core.svn.wordpress.org/trunk@29498 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-09-09 10:03:14 +00:00
Sergey Biryukov
092c349443 Don't display Edit links for attachments user cannot edit.
props skaeser.
fixes #29596 for trunk.
Built from https://develop.svn.wordpress.org/trunk@29723


git-svn-id: http://core.svn.wordpress.org/trunk@29497 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-09-09 09:50:15 +00:00
Sergey Biryukov
1eb26d3ff3 Use https for apps.wordpress.org links.
props pento.
fixes #29595 for trunk.
Built from https://develop.svn.wordpress.org/trunk@29721


git-svn-id: http://core.svn.wordpress.org/trunk@29495 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-09-09 06:29:15 +00:00
Andrew Nacin
0b3ba1e405 Media grid details: Load large images instead of originals, if available.
fixes #29498.

Built from https://develop.svn.wordpress.org/trunk@29704


git-svn-id: http://core.svn.wordpress.org/trunk@29478 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-09-04 14:38:16 +00:00
Andrew Nacin
00fac0639d Link to apps.wordpress.org instead of wordpress.org/mobile.
props pento.
fixes #29496.

Built from https://develop.svn.wordpress.org/trunk@29703


git-svn-id: http://core.svn.wordpress.org/trunk@29477 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-09-04 14:22:15 +00:00
Andrew Nacin
38af73bfab Only media grid (not modal) should show "Uploaded by" and "Uploaded to".
props wonderboymusic.
fixes #29482.

Built from https://develop.svn.wordpress.org/trunk@29683


git-svn-id: http://core.svn.wordpress.org/trunk@29458 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-09-03 02:17:18 +00:00
Andrew Ozz
04e28b468c Media modal: fix the progress bar in the attachment thumbnail. Props gcorne, fixes #29367
Built from https://develop.svn.wordpress.org/trunk@29609


git-svn-id: http://core.svn.wordpress.org/trunk@29383 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-08-25 22:45:16 +00:00
Sergey Biryukov
aed104c51b Don't display an empty "Uploaded To" link in the media modal after [29436].
see #28844.
Built from https://develop.svn.wordpress.org/trunk@29537


git-svn-id: http://core.svn.wordpress.org/trunk@29313 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-08-19 07:24:16 +00:00
Dominik Schilling
a28bc71819 Media Modal: Restore to the previous filter and search error message.
fixes #28963.
Built from https://develop.svn.wordpress.org/trunk@29532


git-svn-id: http://core.svn.wordpress.org/trunk@29308 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-08-18 16:28:19 +00:00
Scott Taylor
3736e6b3f9 Media Modal: don't show the "Edit Image" button for attachments that don't have data.sizes set.
Fixes #28038.

Built from https://develop.svn.wordpress.org/trunk@29529


git-svn-id: http://core.svn.wordpress.org/trunk@29305 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-08-18 02:42:17 +00:00
Scott Taylor
c71437b94b Media Grid: don't try to display images that don't have data.sizes set. Also, don't show the "Edit Image" button.
Props ocean90.
Fixes #29245.

Built from https://develop.svn.wordpress.org/trunk@29528


git-svn-id: http://core.svn.wordpress.org/trunk@29304 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-08-18 02:35:17 +00:00
Helen Hou-Sandí
92e373eb47 Small screen responsive for attachment details modal. see #28844.
Built from https://develop.svn.wordpress.org/trunk@29496


git-svn-id: http://core.svn.wordpress.org/trunk@29274 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-08-15 04:10:16 +00:00
Scott Taylor
df4cc86671 Media Grid, support MEDIA_TRASH:
* Only use the special `trashAttachment` logic when in `edit-metadata` mode.
* Don't support the `trash` filter in the Add Media modal for now.
* Properly toggle trash/untrash logic in the Attachment Details sidebar

See #29145.

Built from https://develop.svn.wordpress.org/trunk@29491


git-svn-id: http://core.svn.wordpress.org/trunk@29269 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-08-14 18:51:19 +00:00
Scott Taylor
571111022e Media Grid, support MEDIA_TRASH:
* Add a setting to `_wpMediaViewsL10n.settings`: `mediaTrash`
* In the attachment edit modal, properly toggle between Trash/Untrash
* In `media.view.Attachment`, add a method for `untrashAttachment`
* When creating the grid toolbar, switch the setting order of subviews so that `media.view.DeleteSelectedButton` can listen to the instance of `media.view.AttachmentFilters.All` to update the text in its UI.
* Add a new filter to `media.view.AttachmentFilters.All`, `trash`, when `settings.mediaTrash` is true
* Allow the cached queries in `Query.get()` to be flushed when race conditions exist and collections need to be refreshed. This is currently only being used when `MEDIA_TRASH` is set, to refresh the filtered/mirrored collections related to `all`, `trash`, and any already queried filter.
* Cleanup the bootstrapping of `media.view.MediaFrame.Manage`
* Allow `wp_ajax_query_attachments()` to return items from the trash when `MEDIA_TRASH` is `true`
* Allow `wp_ajax_save_attachment()` to set `post_status` when `MEDIA_TRASH` is `true`. It allows `wp_delete_post()` to be called, which will trash the attachment instead of deleting when the flag is set.

Props koop for the knowledge sharing and thought partnership.
See #29145.

Built from https://develop.svn.wordpress.org/trunk@29490


git-svn-id: http://core.svn.wordpress.org/trunk@29268 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-08-14 18:31:19 +00:00
Scott Taylor
1c93f05e2a Upgrade MediaElement to 2.15.0:
* It is required to set `height` on the parent `.wp-video` wrapper for video
* Fixes the play button hover problem in Chrome
* Includes my pull request: https://github.com/johndyer/mediaelement/pull/1273

All changes:
https://github.com/johndyer/mediaelement/compare/2.14.2...master

See #29110.

Built from https://develop.svn.wordpress.org/trunk@29457


git-svn-id: http://core.svn.wordpress.org/trunk@29235 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-08-09 20:44:17 +00:00
Scott Taylor
28c22db07d Video:
* Don't set height on responsive `<div>` when generating markup
* Move some CSS rules from the style tag to `.wp-video`
* Use Video Details view event delegation instead of click events delegated from `<body>`
* Fix some CSS rule collision in the grid modal

See #29110.

Built from https://develop.svn.wordpress.org/trunk@29456


git-svn-id: http://core.svn.wordpress.org/trunk@29234 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-08-09 19:39:15 +00:00
Helen Hou-Sandí
485229bc64 Revert styling changes to the Attachment Details modal from [29289]. fixes #28844.
Built from https://develop.svn.wordpress.org/trunk@29436


git-svn-id: http://core.svn.wordpress.org/trunk@29214 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-08-07 20:32:16 +00:00
Scott Taylor
b053fe2e04 Video: use auto instead of actual height for the responsive wrapper in generated markup.
See #29110.

Built from https://develop.svn.wordpress.org/trunk@29430


git-svn-id: http://core.svn.wordpress.org/trunk@29208 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-08-07 06:20:15 +00:00
Scott Taylor
b938bfb7d5 MediaElement upgrade: cleanup for generated markup for videos.
See #29110.

Built from https://develop.svn.wordpress.org/trunk@29429


git-svn-id: http://core.svn.wordpress.org/trunk@29207 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-08-07 05:53:15 +00:00
Scott Taylor
582b5144b2 Media Grid: after [28996], use the same cover size for audio/video files that images use for thumbnails.
See #24716.

Built from https://develop.svn.wordpress.org/trunk@29416


git-svn-id: http://core.svn.wordpress.org/trunk@29194 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-08-06 19:33:14 +00:00
Andrew Ozz
e6b0d0c9ee Media modal/grid: remove thumbnail resizing from JS, only keep setting number of columns. Props avryl, see #27423.
Built from https://develop.svn.wordpress.org/trunk@29376


git-svn-id: http://core.svn.wordpress.org/trunk@29154 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-08-05 05:20:18 +00:00
Andrew Ozz
a8fd1330ae Media modal: use the same classes to hide the "or" that is above the "Select files" button when no drag-drop support. See #28851.
Built from https://develop.svn.wordpress.org/trunk@29373


git-svn-id: http://core.svn.wordpress.org/trunk@29151 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-08-04 21:17:16 +00:00
Dominik Schilling
e6513fe33b Media Modal: Restore uploader view, when no items are found.
see #28963.
Built from https://develop.svn.wordpress.org/trunk@29364


git-svn-id: http://core.svn.wordpress.org/trunk@29140 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-08-02 20:47:16 +00:00
Sergey Biryukov
3f3395a086 Avoid PHP notices in Media Library if an attachment parent post type no longer exists.
Synchronize the 'edit_post' capability check between the list table and the media grid.

fixes #27446.
Built from https://develop.svn.wordpress.org/trunk@29320


git-svn-id: http://core.svn.wordpress.org/trunk@29101 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-29 01:41:16 +00:00
Dominik Schilling
a777a561fa Media Grid: Add context for "or" in [29296].
see #28851.
Built from https://develop.svn.wordpress.org/trunk@29303


git-svn-id: http://core.svn.wordpress.org/trunk@29085 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-26 14:37:19 +00:00
Scott Taylor
477a823d25 Media Grid: improve uploader styles.
Props michalzuber, ericlewis.
See #28851.

Built from https://develop.svn.wordpress.org/trunk@29296


git-svn-id: http://core.svn.wordpress.org/trunk@29078 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-25 00:31:15 +00:00
Scott Taylor
97604df447 Media Grid: change text to "Close Media Panel" to provide context for screen readers.
Props joedolson.
Fixes #28976.

Built from https://develop.svn.wordpress.org/trunk@29295


git-svn-id: http://core.svn.wordpress.org/trunk@29077 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-25 00:26:15 +00:00
Scott Taylor
27866228af Media Grid: UI improvements to Attachment modal.
Props ryelle.
See #28844.

Built from https://develop.svn.wordpress.org/trunk@29289


git-svn-id: http://core.svn.wordpress.org/trunk@29071 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-24 21:55:17 +00:00
Scott Taylor
c83f891d54 Media Grid: remove pencil icon from attachment hover and a bunch of unused CSS.
Fixes #28945.

Built from https://develop.svn.wordpress.org/trunk@29288


git-svn-id: http://core.svn.wordpress.org/trunk@29070 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-24 21:18:18 +00:00
Scott Taylor
58741e0909 The Underscore templates for Gallery settings should respect defaults when marking an <option> as selected.
See #28693.

Built from https://develop.svn.wordpress.org/trunk@29283


git-svn-id: http://core.svn.wordpress.org/trunk@29065 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-24 19:35:15 +00:00
Helen Hou-Sandí
6f44e96d70 Set default values for attachment meta and ID3 data when preparing for JS to avoid errors in rendering templates. props ericmann for the initial patch. fixes #29013.
Built from https://develop.svn.wordpress.org/trunk@29281


git-svn-id: http://core.svn.wordpress.org/trunk@29063 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-24 18:04:18 +00:00
Helen Hou-Sandí
448275cce4 Media Grid: Remove fields from showing in the grid itself.
All details are still available within the modal, and less-distinguishable non-image files still show the filename along with the file type icon.

Reverts [29079], [29078], [29077], and [28995]. see #24716.

Built from https://develop.svn.wordpress.org/trunk@29280


git-svn-id: http://core.svn.wordpress.org/trunk@29062 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-24 05:26:15 +00:00
Helen Hou-Sandí
795c97d08b Add support for attachment_fields_to_edit in the attachment details modal. props ericlewis. fixes #28991, see #24716.
Built from https://develop.svn.wordpress.org/trunk@29278


git-svn-id: http://core.svn.wordpress.org/trunk@29060 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-23 22:09:18 +00:00
Scott Taylor
0702527010 Media Grid: general JS cleanup.
Props ericlewis.
See #28965.


Built from https://develop.svn.wordpress.org/trunk@29266


git-svn-id: http://core.svn.wordpress.org/trunk@29049 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-22 16:21:15 +00:00
Helen Hou-Sandí
89a8316946 Move the "view" link for attachment details to the sidebar and use more specific language. Removes an unnecessary JS handler. fixes #28977.
Built from https://develop.svn.wordpress.org/trunk@29263


git-svn-id: http://core.svn.wordpress.org/trunk@29046 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-22 02:20:15 +00:00
Sergey Biryukov
8923bb0c0e Media Grid: Add a View button to Attachment Details modal.
props adamsilverstein.
fixes #28977.
Built from https://develop.svn.wordpress.org/trunk@29262


git-svn-id: http://core.svn.wordpress.org/trunk@29045 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-22 01:30:16 +00:00
Helen Hou-Sandí
06f5b5a490 Media Grid:
Instead of a separate bulk selection mode, persistently show a checkbox for each item. Restores the more familiar bulk actions dropdown + action button.

props ericlewis. see #28842.


Built from https://develop.svn.wordpress.org/trunk@29212


git-svn-id: http://core.svn.wordpress.org/trunk@28996 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-17 20:42:15 +00:00
Scott Taylor
87e14a7ecc After [29106], check for data.meta before attempting to render data.meta.bitrate.
See #28839.

Built from https://develop.svn.wordpress.org/trunk@29208


git-svn-id: http://core.svn.wordpress.org/trunk@28992 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-17 17:42:16 +00:00
Helen Hou-Sandí
b7445ec8a4 Media Grid Attachment Details modal UI improvements:
* Align better visually with the existing media modal and the post image edit modal.
* Add back a link to the full attachment edit screen (post.php).
* Add a title to the modal and move prev/next buttons next to the more-consistent close button.
* Remove mode tabs (metadata vs. image editing) in favor of the Edit Image button.

Still to come: responsive, IE8 testing and targeted CSS (calc() usage), general CSS cleanup.

props ericlewis, helen, melchoyce. see #28844. fixes #28915.

Built from https://develop.svn.wordpress.org/trunk@29204


git-svn-id: http://core.svn.wordpress.org/trunk@28988 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-17 03:55:15 +00:00
Scott Taylor
93fdff3581 Simplify creation of audio, video, and playlist MCE views by placing them in iframe sandboxes.
Wins:
* Eliminates duplication of code between PHP and JS
* Views can load JS without messing with TinyMCE and scope
* MEjs doesn't break when it loads a file plugin-mode. This allows any file type the MEjs supports to play in MCE views.
* YouTube now works as the source for video.
* Users can still style the views, editor stylesheets are included in these sandboxes.
* Audio and Video URLs and `[embed]`s are no longer broken.
* Remove the crazy compat code necessary to determine what file types play in what browser.
* Remove unneeded Underscore templates.
* Remove the compat code for playlists.

See #28905.

Built from https://develop.svn.wordpress.org/trunk@29179


git-svn-id: http://core.svn.wordpress.org/trunk@28963 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-15 22:18:14 +00:00
Dominik Schilling
6ef23ea006 Lists View Switcher: Replace blank image with screen reader text.
props davidakennedy.
fixes #28871.
Built from https://develop.svn.wordpress.org/trunk@29133


git-svn-id: http://core.svn.wordpress.org/trunk@28918 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-13 11:05:15 +00:00
Scott Taylor
e3c39d02cf Media Grid, for audio files: show Bitrate in the Edit Attachments modal a la the Edit Post screen.
See #28839.

Built from https://develop.svn.wordpress.org/trunk@29106


git-svn-id: http://core.svn.wordpress.org/trunk@28892 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-11 21:56:16 +00:00
Scott Taylor
ba688f4ff9 In the Post/Select frames, for audio files:
* Show `artist` and `album` fields in the Attachment Details sidebar
* Sync their values on `change`

See #28839.

Built from https://develop.svn.wordpress.org/trunk@29105


git-svn-id: http://core.svn.wordpress.org/trunk@28891 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-11 21:02:15 +00:00