Scott Taylor
7f15998947
Videos in the media modal:
...
* Support rendering of chromeless YouTube when a video shortcode's `src` is a YouTube URL.
* Don't instantiate an instance of `MediaElementPlayer` until after the view has been attached to the DOM and the view's `ready` event has fired.
* Don't set `poster` for videos when its value is empty. Much like `src` in the `img` tag - when empty, it will assume and load the current window's URL.
* When removing a player instance, don't call the `pause` method if the playback is not native.
See #27016 .
Built from https://develop.svn.wordpress.org/trunk@27452
git-svn-id: http://core.svn.wordpress.org/trunk@27298 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-07 08:32:14 +00:00
Andrew Ozz
88a47ecd06
TinyMCE editimage: show the toolbar on mouseup
to avoid accidental clicks on the buttons, fixes #24409
...
Built from https://develop.svn.wordpress.org/trunk@27451
git-svn-id: http://core.svn.wordpress.org/trunk@27297 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-07 06:34:14 +00:00
Scott Taylor
52fdb09e2d
Support the autoplay
attribute, even when the plugin type for a MediaElement instance is Flash. In the media modal, wp.media.view.VideoDetails
and wp.media.view.AudioDetails
now extend a unified wp.media.view.MediaDetails
class which contains all of the player creation and destruction logic. The remove()
method mimics the mejs.MediaElementPlayer.remove()
method, but does not re-add the audio/video tag to the DOM. The MEjs method is especially problematic when the tag has autoplay="true"
and the view has been detached but not destroyed.
...
Fixes #25077 .
See #27016 .
Built from https://develop.svn.wordpress.org/trunk@27450
git-svn-id: http://core.svn.wordpress.org/trunk@27296 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-07 05:52:14 +00:00
Andrew Ozz
2b697a3d84
TinyMCE: add Ctrl+K, the "de-facto standard" shortcut to open wpLink, fixes #27305
...
Built from https://develop.svn.wordpress.org/trunk@27449
git-svn-id: http://core.svn.wordpress.org/trunk@27295 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-07 03:09:14 +00:00
Andrew Ozz
6f1668c43d
TinyMCE:
...
- Restore the "link" button state to disabled by default and enabled when text or image is selected.
- Remove the (recently added) default `link` plugin, not needed for `wpLink`.
See #27309
Built from https://develop.svn.wordpress.org/trunk@27447
git-svn-id: http://core.svn.wordpress.org/trunk@27293 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-07 02:02:13 +00:00
Helen Hou-Sandí
4bb7e03548
At long last, a first pass at bringing the image editor into the media modal. props gcorne, DH-Shredder, tomauger. see #21811 .
...
Built from https://develop.svn.wordpress.org/trunk@27445
git-svn-id: http://core.svn.wordpress.org/trunk@27292 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-06 22:55:14 +00:00
Scott Taylor
023b419727
Call the correct remove()
method on the MEjs instance when exiting the media modal.
...
See #27016 .
Built from https://develop.svn.wordpress.org/trunk@27443
git-svn-id: http://core.svn.wordpress.org/trunk@27290 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-06 20:13:15 +00:00
Scott Taylor
eda85e17ca
Cleanup audio/video shortcodes in the media modal:
...
* On the controller's `update`, `replace`, and `close` events, call `detach()` on the frame
* Cleanup the HTML ouput of the Underscore templates.
* Move some logic from the Underscore template to the `VideoDetails` view class.
See #27016 .
Built from https://develop.svn.wordpress.org/trunk@27440
git-svn-id: http://core.svn.wordpress.org/trunk@27287 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-06 19:06:16 +00:00
Scott Taylor
ba27ced46b
Add a loading indicator to the Media Library.
...
Props kadamwhite, gcorne, kovshenin.
Fixes #24859 .
Built from https://develop.svn.wordpress.org/trunk@27438
git-svn-id: http://core.svn.wordpress.org/trunk@27285 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-06 17:46:15 +00:00
Scott Taylor
01c0b48822
Make widget customizer code pass JSHint.
...
Fixes #27298 .
Built from https://develop.svn.wordpress.org/trunk@27436
git-svn-id: http://core.svn.wordpress.org/trunk@27283 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-06 16:45:15 +00:00
Scott Taylor
bc9838f86f
We shall pledge to run jshint
before committing.
...
Props nacin for the nudge.
Built from https://develop.svn.wordpress.org/trunk@27435
git-svn-id: http://core.svn.wordpress.org/trunk@27282 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-06 16:06:14 +00:00
Andrew Ozz
f0bfa77a4a
TinyMCE: add the <hr> plugin and button, see #27159
...
Built from https://develop.svn.wordpress.org/trunk@27428
git-svn-id: http://core.svn.wordpress.org/trunk@27275 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-06 00:54:14 +00:00
Andrew Ozz
79441fc1c1
TinyMCE: remove border-radius and padding from placeholder images, props avryl, see #27106
...
Built from https://develop.svn.wordpress.org/trunk@27427
git-svn-id: http://core.svn.wordpress.org/trunk@27274 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-06 00:29:15 +00:00
Andrew Ozz
62d68cc992
TinyMCE: when parsing [caption] and the width attribute is missing, recreate it from the image tag width, fixes #23103
...
Built from https://develop.svn.wordpress.org/trunk@27426
git-svn-id: http://core.svn.wordpress.org/trunk@27273 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-06 00:13:14 +00:00
Scott Taylor
9aa05f8681
Add a timestamp to the urls passed to <audio>
and <video>
in the modal to ensure that cached view instances aren't referenced by MEjs. Pause the player when closing the controller's modal.
...
See #27016 , #26779 .
Built from https://develop.svn.wordpress.org/trunk@27420
git-svn-id: http://core.svn.wordpress.org/trunk@27267 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-05 21:37:13 +00:00
Andrew Nacin
e853a9cc57
Add widget management to the customizer.
...
This brings in the Widget Customizer plugin: https://wordpress.org/plugins/widget-customizer/ .
props westonruter, shaunandrews, michael-arestad, johnregan3, akeda, topher1kenobe, topquarky, bobbravo2, ricardocorreia. And for good measure, props westonruter.
see #27112 .
Built from https://develop.svn.wordpress.org/trunk@27419
git-svn-id: http://core.svn.wordpress.org/trunk@27266 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-05 20:41:14 +00:00
Scott Taylor
09d8606428
Add some missing JSDoc blocks to media-related code.
...
See #27016 .
Built from https://develop.svn.wordpress.org/trunk@27415
git-svn-id: http://core.svn.wordpress.org/trunk@27262 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-05 18:37:15 +00:00
Scott Taylor
0ccc1d52ac
Audio doesn't have the same quirks as video in the media modal. We don't have to aggressively destroy the mejs
instance.
...
See #27016 .
Built from https://develop.svn.wordpress.org/trunk@27414
git-svn-id: http://core.svn.wordpress.org/trunk@27261 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-05 18:32:14 +00:00
Scott Taylor
ff8844deae
Add TinyMCE placeholders for audio
and video
shortcodes.
...
* Add `wp.media.mixin`.
* Add `wp.media.audio` and `wp.media.video`.
* Add `wp.media.model.PostAudio` and `wp.media.model.PostVideo`
* Add `wp.media.controller.AudioDetails` and `wp.media.controller.VideoDetails`.
* Add `wp.media.controller.ReplaceAudio` and `wp.media.controller.ReplaceVideo`.
* Add `wp.media.view.MediaFrame.AudioDetails` and `wp.media.view.MediaFrame.VideoDetails`.
* Add `wp.media.view.AudioDetails` and `wp.media.view.VideoDetails`.
* Update the `wpgallery` TinyMCE plugin.
* Display audio and video players in the media modal when shortcode is clicked.
* Provide a UI to edit shortcode attributes in the media modal.
* Provide a UI to replace the `src` media file in an `audio` or `video` shortcode.
See #27016 .
Built from https://develop.svn.wordpress.org/trunk@27411
git-svn-id: http://core.svn.wordpress.org/trunk@27258 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-05 15:06:14 +00:00
Andrew Ozz
6074dfa272
Update mce-view.js and the wpview
TinyMCE plugin, and use them to show gallery previews in the Visual editor, props gcorne, see #26959
...
Built from https://develop.svn.wordpress.org/trunk@27408
git-svn-id: http://core.svn.wordpress.org/trunk@27255 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-05 07:01:14 +00:00
Andrew Ozz
7121bb490d
Restyles the modal for attaching media to posts, take II (also some autoprefixer and imagemin). Props avryl, see #26952 .
...
Built from https://develop.svn.wordpress.org/trunk@27403
git-svn-id: http://core.svn.wordpress.org/trunk@27250 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-05 03:54:15 +00:00
Andrew Nacin
3028e6e7fb
Add jquery.masonry.min.js. fixes #25351 .
...
Built from https://develop.svn.wordpress.org/trunk@27389
git-svn-id: http://core.svn.wordpress.org/trunk@27237 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-04 02:20:14 +00:00
Andrew Ozz
5525f32fd8
TinyMCE: update to 4.0.18, see #24067
...
Built from https://develop.svn.wordpress.org/trunk@27387
git-svn-id: http://core.svn.wordpress.org/trunk@27235 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-04 01:57:15 +00:00
Andrew Nacin
70d23fc559
Support multiple editor instances when drag-and-drop-uploading onto them.
...
Also reduces z-index to below the toolbar, and adds a comment.
props kovshenin.
see #19845 .
Built from https://develop.svn.wordpress.org/trunk@27378
git-svn-id: http://core.svn.wordpress.org/trunk@27227 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-03 17:44:16 +00:00
Andrew Nacin
420afb81de
TinyMCE: Propagate the dragover event outside the editor so drag-and-drop uploads can catch it.
...
props kovshenin.
see #19845 .
Built from https://develop.svn.wordpress.org/trunk@27372
git-svn-id: http://core.svn.wordpress.org/trunk@27221 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-03 15:54:21 +00:00
Andrew Ozz
cab6362f2b
Editor: throttle scrolling of the main window when the editor is active and is being scrolled with the mouse wheel or a trackpad, see #27013
...
Built from https://develop.svn.wordpress.org/trunk@27368
git-svn-id: http://core.svn.wordpress.org/trunk@27218 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-03 02:34:14 +00:00
Scott Taylor
cbe89d6710
Adjust the priority of the separator in the Edit Playlist and Edit Video Playlist menus to match the structure of the Edit Gallery menu.
...
Props gcorne.
See #26631 .
Built from https://develop.svn.wordpress.org/trunk@27363
git-svn-id: http://core.svn.wordpress.org/trunk@27213 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-02 23:13:14 +00:00
Scott Taylor
c0a9ee8452
Make CollectionEdit
and CollectionAdd
less dynamically quirky. Rename some instance properties for disambiguation. Pass some properties from options
when creating instances in wp.media.view.MediaFrame.Post
.
...
See #26631 .
Props gcorne.
Built from https://develop.svn.wordpress.org/trunk@27362
git-svn-id: http://core.svn.wordpress.org/trunk@27212 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-02 23:11:14 +00:00
Scott Taylor
330f27f095
Add some braces for jshint
in media-views.js
.
...
See #26631 .
Props gcorne.
Built from https://develop.svn.wordpress.org/trunk@27361
git-svn-id: http://core.svn.wordpress.org/trunk@27211 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-02 23:07:15 +00:00
Sergey Biryukov
f01dc328c5
Remove extra comma. props jorbin. see #19845 .
...
Built from https://develop.svn.wordpress.org/trunk@27352
git-svn-id: http://core.svn.wordpress.org/trunk@27203 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-02 19:01:13 +00:00
Andrew Ozz
cd0552a810
TinyMCE: remove box-shadow from the "more" and "nextpage" placeholder images, props avryl, see #24067
...
Built from https://develop.svn.wordpress.org/trunk@27345
git-svn-id: http://core.svn.wordpress.org/trunk@27197 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-01 22:36:14 +00:00
Andrew Nacin
482856e2e1
Add the ability to drag and drop files directly onto the editor.
...
The file will then begin to upload and the media manager will open.
props kovshenin.
see #19845 .
Built from https://develop.svn.wordpress.org/trunk@27343
git-svn-id: http://core.svn.wordpress.org/trunk@27195 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-01 21:34:17 +00:00
Andrew Ozz
8d670f0862
Plupload: remove the (old) plupload.silverlight.xap, remove the "executable" prop from Moxie.xap, see #25663
...
Built from https://develop.svn.wordpress.org/trunk@27340
git-svn-id: http://core.svn.wordpress.org/trunk@27192 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-01 07:37:13 +00:00
Scott Taylor
3dc901a92a
Rather than extending media.controller.CollectionAdd
3 times, make it a constructor that dynamically extends media.controller.Library
and use instances of it instead.
...
See #26631 .
Built from https://develop.svn.wordpress.org/trunk@27322
git-svn-id: http://core.svn.wordpress.org/trunk@27174 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-27 23:04:13 +00:00
Scott Taylor
2ea01e110b
Restore / re-tools some docs after [27313].
...
See #26631 .
Built from https://develop.svn.wordpress.org/trunk@27321
git-svn-id: http://core.svn.wordpress.org/trunk@27173 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-27 21:51:14 +00:00
Scott Taylor
db1a8785b5
Some playlist cleanup:
...
* Check properties against the `window` object when using `_.isUndefined()` on globals
* Fix a typo for `$safe_type` introduced in [27311]
See #26631 .
Built from https://develop.svn.wordpress.org/trunk@27320
git-svn-id: http://core.svn.wordpress.org/trunk@27172 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-27 21:38:17 +00:00
Andrew Ozz
21b74a037d
Remove debugging cruft, see #25663
...
Built from https://develop.svn.wordpress.org/trunk@27318
git-svn-id: http://core.svn.wordpress.org/trunk@27170 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-27 20:15:16 +00:00
Scott Taylor
cf1d899cc8
In media-editor.js
, use _.isUndefined()
when available.
...
See #26631 .
Built from https://develop.svn.wordpress.org/trunk@27317
git-svn-id: http://core.svn.wordpress.org/trunk@27169 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-27 20:11:14 +00:00
Andrew Ozz
d896fa2487
Upgrade Plupload to 2.1.1, props kovshenin, see #25663
...
Built from https://develop.svn.wordpress.org/trunk@27316
git-svn-id: http://core.svn.wordpress.org/trunk@27168 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-27 20:01:16 +00:00
Scott Taylor
baeecbe763
This comment was pasted and does not apply to specified code block.
...
See #26631 .
Built from https://develop.svn.wordpress.org/trunk@27315
git-svn-id: http://core.svn.wordpress.org/trunk@27167 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-27 19:51:14 +00:00
Scott Taylor
45e748e57e
wp.media.collection
should be its own civilized instantiable class, not a wrapper/factory. The class shall contain no reference to specific instances, and shall not try to grab static properties of itself. self
, meet this
.
...
See #26631 .
Built from https://develop.svn.wordpress.org/trunk@27313
git-svn-id: http://core.svn.wordpress.org/trunk@27166 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-27 19:22:14 +00:00
Scott Taylor
abebb1fde2
Correct a misspelled property name in a media-views.js
annotation.
...
Props kovshenin.
See #26870 .
Built from https://develop.svn.wordpress.org/trunk@27309
git-svn-id: http://core.svn.wordpress.org/trunk@27162 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-27 03:07:14 +00:00
Scott Taylor
8a4ef32f7a
Populate playlist setting values with their default value if they don't exist while parsing shortcode attributes.
...
Props kovshenin.
See #26631 .
Built from https://develop.svn.wordpress.org/trunk@27308
git-svn-id: http://core.svn.wordpress.org/trunk@27161 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-27 02:55:13 +00:00
Andrew Nacin
c4545fbbf4
Remove unnecessary quotes from urls in CSS.
...
props TobiasBg.
fixes #22476 .
Built from https://develop.svn.wordpress.org/trunk@27289
git-svn-id: http://core.svn.wordpress.org/trunk@27145 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-26 17:23:13 +00:00
Andrew Ozz
511f12f793
When closing the various "edit" media modals, remove the related views elements from the DOM. Props gcorne, fixes #27204 .
...
Built from https://develop.svn.wordpress.org/trunk@27276
git-svn-id: http://core.svn.wordpress.org/trunk@27132 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-25 21:03:15 +00:00
Andrew Nacin
1cb9788f1b
Update the Masonry JavaScript library to version 3.
...
The new script handle is 'masonry'. The old 'jquery-masonry' handle is the official shiv that sits on top of the v3 library. While v3 no longer depends on jQuery, a theme or plugin may have bee
n implicitly loading jQuery though Masonry, rather than additionally declaring it as a dependency for themselves. Thus, the shiv is separate.
Themes should switch to 'masonry' and declare jQuery as a dependency on their own if they need it. Upgrade guide: http://masonry.desandro.com/appendix.html#upgrading-from-v2 . imagesLoaded remai
ns included with Masonry here.
props shelob9.
fixes #25351 .
Built from https://develop.svn.wordpress.org/trunk@27271
git-svn-id: http://core.svn.wordpress.org/trunk@27127 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-25 19:53:15 +00:00
Andrew Nacin
74f2a32f52
Fixed mixed spaces and tabs. Also remove trailing comma. see #26631 .
...
Built from https://develop.svn.wordpress.org/trunk@27266
git-svn-id: http://core.svn.wordpress.org/trunk@27123 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-25 17:32:14 +00:00
Scott Taylor
4b66e01e6d
Remove a few unnecessary jQuery selectors added in [27239]. Playlists don't exist in some older contexts that galleries do.
...
See #26631 .
Built from https://develop.svn.wordpress.org/trunk@27243
git-svn-id: http://core.svn.wordpress.org/trunk@27100 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-24 20:49:14 +00:00
Scott Taylor
c0379aaafc
Load default settings state when creating a new playlist in the media modal. Add a few missing inline @this
annotations in media-editor.js
.
...
See #26631 .
Built from https://develop.svn.wordpress.org/trunk@27242
git-svn-id: http://core.svn.wordpress.org/trunk@27099 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-24 20:26:14 +00:00
Scott Taylor
943f295d2e
Add core support for Playlists and Video Playlists.
...
* Playlists operate like galleries in the admin.
* Provide default UI and JS support in themes using MediaElement and Backbone.
* The shortcodes are clickable, editable, and configurable using the media modal.
* Playlists support images for each item, whether or not the current theme supports images for `attachment:audio` and `attachment:video`
* Playlists respond to `$content_width` and resize videos accordingly.
* All playlist data is included inline, using a script tag with `type="application/json"`, allowing anyone to unenqueue the WP playlist JS and roll their own.
* Playlist styles are minimal and work out of the box in the last 5 default themes. They inherit and adapt to the current theme's font styles, and their rules are easily overrideable.
See #26631 .
Built from https://develop.svn.wordpress.org/trunk@27239
git-svn-id: http://core.svn.wordpress.org/trunk@27096 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-24 18:08:16 +00:00