Commit Graph

118 Commits

Author SHA1 Message Date
whyisjake
3dd9628aae Build/Test Tools: Enable JSDocs to be linted with ESLint.
As part of the [Javascript Inline Docs Initiative](https://make.wordpress.org/core/handbook/docs/inline/js/) this add some tooling to lint Javascript docblocks. Two new commands:

* `npm run lint:jsdoc`
* `npm run lint:jsdoc:fix`

The latter will run the linter and try to fix an possible issues automatically.

Fixes #43828.
Props netweb, atimmer, kamataryo, whyisjake.


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


git-svn-id: http://core.svn.wordpress.org/trunk@48412 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-27 23:35:02 +00:00
Dominik Schilling
4377e9a44e I18N: Use wp.i18n for translatable strings in wp-admin/js/set-post-thumbnail.js.
This removes the usage of `wp_localize_script()` for passing translations to the script and instead adds the translatable strings in the script directly through the use of `wp.i18n` and its utilities.

Props swissspidy, ocean90.
See #20491.
Fixes #50605.
Built from https://develop.svn.wordpress.org/trunk@48396


git-svn-id: http://core.svn.wordpress.org/trunk@48165 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-07 18:55:04 +00:00
Sergey Biryukov
735d31ffbb Coding Standards: Add missing braces to if conditions and use strict comparison in js/_enqueues/wp/media/editor.js.
Props ankitmaru.
Fixes #49317.
Built from https://develop.svn.wordpress.org/trunk@47349


git-svn-id: http://core.svn.wordpress.org/trunk@47136 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-02-23 08:58:05 +00:00
Sergey Biryukov
001ffe81fb Docs: Improve inline comments per the documentation standards.
Includes minor code layout fixes for better readability.

See #48303.
Built from https://develop.svn.wordpress.org/trunk@47122


git-svn-id: http://core.svn.wordpress.org/trunk@46922 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-01-29 00:45:18 +00:00
Sergey Biryukov
2a0489ec49 Docs: Replace @returns tags in JS docs with @return.
Per the documentation standards, `@returns` is an unsupported synonym, `@return` should be used instead:
https://make.wordpress.org/core/handbook/best-practices/inline-documentation-standards/javascript/

See #48303.
Built from https://develop.svn.wordpress.org/trunk@46800


git-svn-id: http://core.svn.wordpress.org/trunk@46600 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-11-29 18:01:03 +00:00
Sergey Biryukov
4a4afbd68c Docs: Add missing full stops to @returns tags in JS docs, per the documentation standards.
Props shital-patel, kalpshit.
Fixes #48305.
Built from https://develop.svn.wordpress.org/trunk@46799


git-svn-id: http://core.svn.wordpress.org/trunk@46599 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-11-29 16:56:02 +00:00
John Blackbourn
47d32decd6 Docs: Correct and improve various inline documentation.
See #42505

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


git-svn-id: http://core.svn.wordpress.org/trunk@43411 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-08-27 14:28:26 +00:00
atimmer
bde558be2f Docs: Add file doc @output annotations.
These annotations make it clear to the reader of a JavaScript source
where the build process outputs to. These annotations can later be
integrated in a webpack configuration. This way there is one source of
truth.

The `build` folder is omitted from the paths, because a single JS file
shouldn't not be responsible of knowing where outputs in general will
end up at. A file only knows its output location relative to the
project.

Props adamsilverstein, herregroen, omarreiss, pento.
Fixes #44361.

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


git-svn-id: http://core.svn.wordpress.org/trunk@43175 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-06-28 02:30:15 +00:00
Adam Silverstein
8a23b80b56 Docs: JSDoc improvements for namespaces.
Improve JS parsing of our inline JSDocs by introducing `@namespace`, `@lends` and `@memberOf`. Helps set the way for showing our JavaScript documentation on developer.wordpress.org, see https://meta.trac.wordpress.org/ticket/3063.

* Define all used namespaces using @namespace.
* Correctly specify in which namespace each class is using @memberOf.
* Define each usage of the extend function as a prototype assignment using @lends.
* Some comment blocks were moved to correct the parsing of certain definitions. 

Props herregroen, atimmer, netweb, SergeyBiryukov.  
Fixes #41682.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41184 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-09-08 18:42:49 +00:00
Joe McGill
8ed022b568 Media: Remove alt fallbacks to improve accessibility.
This removes the fallbacks in `wp_get_attachment_image()` and in
`wp.media.string.props` which attempt to generate an `alt` value
from the image caption or title if an `alt` attribute isn't explicitly
set.

This allows for image HTML to be generated that contains an empty `alt`
value, i.e., `alt=""` which is much preferable for screen readers than
reading redundant content in the case of a caption, or when reading the
image title, which is often generated from the filename and not helpful
as `alt` text.

Props odie2, joedolson, rianrietveld, afercia, iamjolly, joemcgill.
Fixes #34635.
Built from https://develop.svn.wordpress.org/trunk@38812


git-svn-id: http://core.svn.wordpress.org/trunk@38755 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-19 03:06:28 +00:00
Andrea Fercia
c3ad2eee78 Accessibility: Handle focus when closing the media modal.
When closing the media modal, by default focus should be moved back to the UI
control that was clicked to open the modal. The only exception is when inserting
images into the Visual or Text editor.

Fixes #38142.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38595 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-25 21:33:31 +00:00
Joe McGill
3dbba0fff3 Post Thumbnails: Only update featured images when saving a post.
Previously, changing the post thumbnail of a published post in the edit screen
would immediately apply the change, rather than waiting for the post to be
saved before applying the update. This could lead to someone unintentionally
editing the post thumbnail on a published post, and made it impossible to
preview changes to post thumbnails on published posts before saving the change.

This introduces a new Ajax handler, `wp_ajax_get_post_thumbnail_html()` to
retrieve the HTML for the post thumbnail meta box without updating the post
meta value for `_thumbnail_id`. It also allows post thumbnail changes to be
previewed by passing the `_thumbnail_id` as a query variable to the preview
screen and adding a new filter, `_wp_preview_post_thumbnail_filter()`, which
gets applied to `get_post_metadata` during the post preview process.

Props flixos90.
Fixes #12922.
Built from https://develop.svn.wordpress.org/trunk@38118


git-svn-id: http://core.svn.wordpress.org/trunk@38059 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-20 16:24:28 +00:00
Joe McGill
c1e8f430f9 Media: Always add alt attributes to images inserted from URLs
Previously, when inserting an image from a URL, leaving the `alt`
field blank in the media modal would result in an image being
inserted into the editor without an `alt` attribute, rather than
an empty `alt`. This happened because the `props.type` would not
get set in `wp.media.string.props()` — because `attachment` is
undefined in this case — causing the image fallbacks to get
skipped.

This fixes the issue by explicitly setting `props.type` to 'image'
in `wp.media.string.image()` before filling out the rest of the
properties.

Props ambrosey, dabnpits.
Fixes #36735.
Built from https://develop.svn.wordpress.org/trunk@38065


git-svn-id: http://core.svn.wordpress.org/trunk@38006 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-15 03:16:30 +00:00
Scott Taylor
6759f04a24 Media JS: ensure that wp.media.frame (a static reference to the "current" Frame) is reset when a cached frame is opened.
Fixes #33458.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34218 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-17 00:10:26 +00:00
Helen Hou-Sandí
efef6f8b79 Avoid a PHP notice when adding an embed via Insert from URL.
props iseulde.
see #32006, #29476.

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


git-svn-id: http://core.svn.wordpress.org/trunk@32218 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-04-21 14:36:25 +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
ebe813ca54 Add a namespace to the click handler registration for .insert-media in media-editor.js: click.add-media-button.
This is a stopgap to allow devs to override the default behavior.

Fixes #23096.

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


git-svn-id: http://core.svn.wordpress.org/trunk@29569 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-01 19:08:16 +00:00
Mark Jaquith
0d3b83551f Use HTTPS URLs for core.trac.wordpress.org
see #27115
Built from https://develop.svn.wordpress.org/trunk@29788


git-svn-id: http://core.svn.wordpress.org/trunk@29560 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-09-29 13:28:16 +00:00
Andrew Ozz
d0a76f284f Media modal: when inserting content, prefer the editor id passed while opening the modal. wpActiveEditor can change in the background. (Includes some precommit prefixed selectors.) Fixes #28173
Built from https://develop.svn.wordpress.org/trunk@29603


git-svn-id: http://core.svn.wordpress.org/trunk@29377 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-08-25 19:37:16 +00:00
Andrew Ozz
2f4bd918b2 TinyMCE: fix the 'editimage' plugin for touch devices. Better attempt to hide the onscreen keyboard when the media modal opens and TinyMCE is in focus. See #28595, #29166
Built from https://develop.svn.wordpress.org/trunk@29471


git-svn-id: http://core.svn.wordpress.org/trunk@29249 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-08-12 04:27:18 +00:00
Andrew Ozz
b8198ecf64 Media: improve the media modal at small screen sizes and make it usable on phones, first run. Part-props gcorne, see #27423.
Built from https://develop.svn.wordpress.org/trunk@29446


git-svn-id: http://core.svn.wordpress.org/trunk@29224 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-08-08 03:46:17 +00:00
Andrew Ozz
42c8135fac Mobile: hide the onscreen keyboard when the media modal opens, fixes #28549.
Built from https://develop.svn.wordpress.org/trunk@29369


git-svn-id: http://core.svn.wordpress.org/trunk@29147 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-08-03 22:34:16 +00:00
Dominik Schilling
9c77f419f6 Fix jshint errors introduced in [29284] and [29299].
Built from https://develop.svn.wordpress.org/trunk@29306


git-svn-id: http://core.svn.wordpress.org/trunk@29088 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-27 11:49:15 +00:00
Scott Taylor
78518beb6b When gallery settings are overridden, the JS-generated shortcodes need to check the new defaults before deleting attributes that it suspects are the same as the original default values.
`wp.media.collection` has a new method to do this: `setDefaults()`.	Also flips the use of `_.extend` to allow this method to be overriden on instance creation.

See #28693.

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


git-svn-id: http://core.svn.wordpress.org/trunk@29066 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-24 20:00:16 +00:00
Scott Taylor
1571d3c47c Allow users to override default gallery settings in JS via wp_localize_script(). This is already possible in PHP by filtering shortcode_atts_gallery.
Fixes #28693.

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


git-svn-id: http://core.svn.wordpress.org/trunk@28778 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-04 02:03:14 +00:00
Scott Taylor
46a4208f6b Add "edit" mode for [embed] and URL media previews.
See #28532.

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


git-svn-id: http://core.svn.wordpress.org/trunk@28566 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-06-13 21:42:15 +00:00
Mark Jaquith
b9eb0f72e3 Ensure that wp.media.view.settings.post is set before accessing the post's id
Avoids JS error in cases where media-editor is loaded individually
instead of with the whole `wp_enqueue_media()` process.

fixes #27836. props nacin
Built from https://develop.svn.wordpress.org/trunk@28149


git-svn-id: http://core.svn.wordpress.org/trunk@27980 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-04-16 15:26:15 +00:00
Scott Taylor
10b80870ee Only set the poster attribute automatically for videos when the image does not match the default mime-type icon. wp_prepare_attachment_for_js() is used in multiple contexts. This context requires disambiguation.
See [27659].


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


git-svn-id: http://core.svn.wordpress.org/trunk@27810 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-04-07 06:20:16 +00:00
Scott Taylor
2c88f6e941 [27640] supported a caption for audio and video shortcodes as part of a UX iteration for the related MCE views. These captions have since be excluded, so the extra code should be removed (it was there for this sole reason).
See #27320.


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


git-svn-id: http://core.svn.wordpress.org/trunk@27809 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-04-07 06:13:18 +00:00
Scott Taylor
4f868ad882 There is no more video-playlist shortcode. To use video, it is now [playlist type="video" ....]. Also deleting core playlist styles. The style attribute is still supported, defaulting to light. Our core style support was 4-5 CSS rules.
See #27552. Leaving open for comments and potential bugs.


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


git-svn-id: http://core.svn.wordpress.org/trunk@27621 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-27 17:58:15 +00:00
Scott Taylor
16f93f3952 When inserting a video shortcode into the editor, set the poster attribute automatically if the video has a featured image attached to it.
See #27460.


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


git-svn-id: http://core.svn.wordpress.org/trunk@27502 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-23 03:36:15 +00:00
Scott Taylor
615dd5331b Unifying media controls and supporting playlists in the editor:
* Support a `caption` attribute for audio and video shortcodes
* In `wp.media.audio|video`, rename `update` to `shortcode` to allow these models to share the same mixins as `wp.media.collection` subclasses
* When sending an audio or video shortcode to the editor, create a default caption if the user hasn't entered one. This currently only displays in the editor, not on the front end. Captions aren't tied to a specific attachment here because external sources are supported.
* In the `wp.mce.media` mixin, in the `edit` method, read `attr` instead of `data` when attempting to parse the encoded shortcode. `data` does not automatically update when the attribute changes. This was a blessing to debug.
* Add `wp.mce.media.PlaylistView` to support playlist views in TinyMCE
* Expose `WPPlaylistView` to global scope and suppress auto-parsing of playlist nodes when in the admin. Allow `WPPlaylistView` to be passed `metadata` on creation instead of requiring a JSON blob to be parsed.
* Remove all of the playlist logic from the `wpgallery` TinyMCE plugin.
* In `wp_prepare_attachment_for_js()` return more data for audio/video so that playlists can have parity in the admin/front end.

See #27320.


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


git-svn-id: http://core.svn.wordpress.org/trunk@27483 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-20 13:33:14 +00:00
Scott Taylor
a17dd704c4 Create a new file, media-audiovideo.js, to house all of the audio and video JS code in core.
UX Changes:
* Don't add a menu item for "Add Audio|Video Source"
* In the Audio|Video Details modal, add buttons and some suggestive text for adding alternate playback sources
* Don't show "Create Audio|Video Playlist" menu items until the user has uploaded audio or video files

See #27437.


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


git-svn-id: http://core.svn.wordpress.org/trunk@27451 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-19 05:31:15 +00:00
Scott Taylor
12034fcc59 In wp.media.mixin, add ua and a compat map to separate and clarify browser detection and support. Leverage Underscore list iterators in isCompatible().
See #27389.


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


git-svn-id: http://core.svn.wordpress.org/trunk@27385 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-14 20:26:15 +00:00
Scott Taylor
bd4085fac3 The canPlayType property for audio and video in JS is so bad that the official valid responses are "probably" and "maybe". There are many cases where we might want to know if an audio|video tag is gonna blow up in our face before even attempting to make a MediaElementPlayer instance out of it.
The best (and most cautious) way to tackle this is to whitelist types by browser. Imagine that one implemented MEjs in TinyMCE's rich editor mode, this would be very helpful.

Add `isCompatible( $media )` to `wp.media.mixin`. Future features will use this.

See #27389.


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


git-svn-id: http://core.svn.wordpress.org/trunk@27382 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-14 14:36:14 +00:00
Scott Taylor
117d1bd31e Move removePlayer() and unsetPlayer() to wp.media.mixin so that other classes can take advantage of them.
* `removePlayer()` is an alternative to MediaElement's player removal method that does not re-add the audio|video element back to the DOM.
* `unsetPlayer()` will check for an existing `player` property on the passed instance and pause all players before calling `unsetPlayer()`

See #27389.


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


git-svn-id: http://core.svn.wordpress.org/trunk@27381 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-14 13:48:15 +00:00
Scott Taylor
9432aaca82 Rather than extending wp.media.mixin, only borrow coerce when necessary in wp.media.audio|video|collection. wp.media.mixin will make sense to be mixed in for classes that expect to interact with the player. More universal methods can be added and inherited by all those who extend their prototype with it.
Assuming someone had implemented players in the editor, pause all players when switching between editor tabs. A method, `pauseAllPlayers`, has been added to `wp.media.mixin`.

See #27389.


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


git-svn-id: http://core.svn.wordpress.org/trunk@27380 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-14 13:17:16 +00:00
Scott Taylor
b4569b69dc Revert [27528] until Flash in Firefox behaves :(
See #27389.


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


git-svn-id: http://core.svn.wordpress.org/trunk@27373 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-13 23:39:16 +00:00
Scott Taylor
ba84f57083 Add MCE Views for audio and video. Please clear your browser cache so that you get the latest TinyMCE stylesheet.
* Move TinyMCE shortcode handling from `wpgallery` plugin to `mce-view.js`
* Force `preload="none"` when rendering media in the editor to ensure fast loading (I realize this sounds illogical)
* Move audio and video tag builder logic in `media-template.php` into PHP funcs that can be reused by any code passing `data.model` to an Underscore template
* Pause all players when moving between editor tabs and when moving from the editor to editing in the media modal.
* Rename `wp.media.audio|video.shortcode()` to the more appropriate `wp.media.audio|video.update()` that now returns a `wp.shortcode` object instead of a string.
* Add necessary MediaElement css files to `$mce_css`
* In `wp.mce.View.render()`, support multiple instances of the same shortcode
* When rendering `wp.mce.View`s, fire a ready event that passes the current MCE View root element as context 

See #27389.


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


git-svn-id: http://core.svn.wordpress.org/trunk@27371 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-13 23:10:14 +00:00
Scott Taylor
f078f3e10e Video editing in the media modal:
* Add a state: `Add Subititles`
* Add `text/vtt` to the list of allowed mime-types, files end in `.vtt`. `.srt` files are served as `text/plain`.
* The content body of a video shortcode should be used for adding `<track>` elements only. This happens dynamically in the modal. If added by hand, they can still be parsed and managed.

See #27016.


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


git-svn-id: http://core.svn.wordpress.org/trunk@27325 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-09 10:32:15 +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
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
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
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 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
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
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
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