Cast image metadata focal_length and shutter_speed to strings to restore previous behavior when stripslashes_deep() converted these values. Avoids rounding errors without making a determination of which digit we should round to. props jcakec. fixes #22259.



git-svn-id: http://core.svn.wordpress.org/trunk@22319 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Give media a heart transplant.

Revises the concept of the media controller and workspace views (i.e. two central points of control) to be more granular. The main media object is now the `Frame`, which is a hybrid view and state machine.

The state machine is a collection of states, which are just generic instances of `Backbone.Model`. This circumvents the problem of juggling global parameters when changing states. Each state contains its own event loop. All events are also forwarded to the frame itself (as is the case in all model/collection relationships).

The frame view contains several regions, each of which can be overridden without harming or re-rendering the other regions. These work well when used in conjunction with the state machine events.

This removes the upload sidebar (don't worry, visible upload UI will return). Drag and drop uploading still works. The ability to upload has been abstracted into its own view (instead of being attached to the central workspace view).

Editing galleries is temporarily broken — the gallery creation and editing experiences will be unified in a future patch.

Adds events to detect dragging changes in `wp.Uploader` and adds methods to detect and leverage browser support for CSS3 transitions.

see #21390, #21809.


git-svn-id: http://core.svn.wordpress.org/trunk@22320 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Add a sidebar to the media modal.

* Adds `wp.media.view.Sidebar`, to aid in rendering the sidebar.
* Removes the `directions` from the `Attachments` view and shifts search into a separate view (`wp.mce.view.Search`) that can be relocated at will. This also serves to simplify the `Attachments` view by removing the nested `list` and `$list` parameters.
* Show the toolbar on the featured image workflow, effectively requiring confirmation before closing the dialog.

see #21390, #21776, #21808.


git-svn-id: http://core.svn.wordpress.org/trunk@22321 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Add inline uploader UI to media modal sidebar. see #21390.


git-svn-id: http://core.svn.wordpress.org/trunk@22322 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Add attachment details to the media sidebar.

* Also moves most of the `Frame` view's `createSelection` method to a real `Selection` model (which inherits from the `Attachments` model).
* Properly assigns the library within the `Gallery` state, allowing for the `Gallery` state to inherit from the `Library` state.

see #21390.


git-svn-id: http://core.svn.wordpress.org/trunk@22323 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Add dynamic attachment view sizing. Removes the attachment view zooming in the process. see #21390.


git-svn-id: http://core.svn.wordpress.org/trunk@22324 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Improve attachment detailed preview styling. see #21390.


git-svn-id: http://core.svn.wordpress.org/trunk@22325 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Compress scripts/styles: 3.5-beta2-22326.

git-svn-id: http://core.svn.wordpress.org/trunk@22326 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Buttons: make install.css depend on buttons.css (so button styles are always loaded), see #21598

git-svn-id: http://core.svn.wordpress.org/trunk@22327 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Fix the permalink covering the insert media button when wrapped, props SergeyBiryukov, fixes #22298

git-svn-id: http://core.svn.wordpress.org/trunk@22328 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Min-height on the permalink wrapper prevents the editor jumping down when starting new post, props SergeyBiryukov, see #22298

git-svn-id: http://core.svn.wordpress.org/trunk@22329 1a063a9b-81f0-0310-95a4-ce76da25c4cd
When reading local feeds from disk, check that the file exists first to avoid a PHP Warning in WP_SimplePie_File. Props SergeyBiryukov. Fixes #17756


git-svn-id: http://core.svn.wordpress.org/trunk@22330 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Prevent an issue on windows systems which can cause the temporary directory from get_temp_dir() from returning a path containing \/. Props to SergeyBiryukov for the initial patch. Fixes #20778 


git-svn-id: http://core.svn.wordpress.org/trunk@22331 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Improve selection UI/behavior in the media modal.

* Moves handling which models are in the selection into the `Library` state.
* Adds highlight for the last-selected view in a multi-view state.
* A view must be the last-selected view before it can be deselected.

see #21390.


git-svn-id: http://core.svn.wordpress.org/trunk@22332 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Media JS: Remove unused Attachment view events. see #21390.


git-svn-id: http://core.svn.wordpress.org/trunk@22333 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Compress scripts/styles: 3.5-beta2-22334.

git-svn-id: http://core.svn.wordpress.org/trunk@22334 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Media JS: Improve handling of single attachments in selections.

* Adds `wp.media.model.Selection.single()` to specify a single item used in a multi-item selection.
* Fixes a bug where the `details` class would not be removed when "Clear Selection" was clicked.

see #21390.


git-svn-id: http://core.svn.wordpress.org/trunk@22335 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Media CSS: Remove inner shadow when attachment is selected. see #21390.


git-svn-id: http://core.svn.wordpress.org/trunk@22336 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Media JS: Properly build detail views when the selection's single model changes. see #21390.


git-svn-id: http://core.svn.wordpress.org/trunk@22337 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Media JS: Properly fire the Attachment view details method on render. see #21390.


git-svn-id: http://core.svn.wordpress.org/trunk@22338 1a063a9b-81f0-0310-95a4-ce76da25c4cd