When rendering Underscore templates for Audio/Video details, use 2 new PHP functions to render the markup for audio and video tags: `wp_underscore_audio_template()` and `wp_underscore_video_template()`.

Future JS templates can follow the convention of expecting `data` to be passed to them containing a `model` property.

See #27389.


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


git-svn-id: http://core.svn.wordpress.org/trunk@27376 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Load MediaElement's CSS when TinyMCE is loaded via `$mce_css` in `editor_settings()`. Add some baseline styles in `wp-content.css` for audio, video, and embed tags to ensure their `max-width` is `100%`, regardless of whether MEjs is implemented in TinyMCE.

See #27389.


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


git-svn-id: http://core.svn.wordpress.org/trunk@27377 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Make `media.view.VideoDetails.prepareSrc` a static class method instead of an instance method. Properly pairs it with its incrementing `instances` property.

See #27389.


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


git-svn-id: http://core.svn.wordpress.org/trunk@27378 1a063a9b-81f0-0310-95a4-ce76da25c4cd
In `media.model.PostMedia`, for these 2 scenarios:

* `src` is set, and 'Add a Source' results in the same file (or a file with the same extension) being added
* `src` is set, and 'Replace Audio|Video' is used, which will add a model property named by the attachment's extension

... call `model.unset( 'src' )`.

See #27389.


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


git-svn-id: http://core.svn.wordpress.org/trunk@27379 1a063a9b-81f0-0310-95a4-ce76da25c4cd
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
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
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
Customizer: Introduce a processing state.

The processing state will prevent a save when it doesn't return 0.
Widget Customizer will use the state to prevent a save while a widget is updating, which is an asynchronous process.

props westonruter.
fixes #27390.
Built from https://develop.svn.wordpress.org/trunk@27540


git-svn-id: http://core.svn.wordpress.org/trunk@27383 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Widget Customizer: Move widget area sections to bottom.

Since a theme can have a lot of widget areas and we don't want to bury third-party sections, bump the widget sections to the bottom with a priority of 1000+. Fixes also the ordering.

props westonruter.
fixes #27401.
Built from https://develop.svn.wordpress.org/trunk@27541


git-svn-id: http://core.svn.wordpress.org/trunk@27384 1a063a9b-81f0-0310-95a4-ce76da25c4cd
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
Widget Customizer: Make temp hooks final and add inline docs.

New hooks are `dynamic_sidebar_before`, `dynamic_sidebar_after`, `dynamic_sidebar_has_widgets ` and `is_active_sidebar`.
Remove obsolete use of hacky dynamic_sidebar hook.

props westonruter, DrewAPicture.
fixes #25368.
Built from https://develop.svn.wordpress.org/trunk@27543


git-svn-id: http://core.svn.wordpress.org/trunk@27386 1a063a9b-81f0-0310-95a4-ce76da25c4cd
MCE Views: don't (re-)render views if the format of the content is "raw" to avoid adding additional undo levels on undo/redo.

Props gcorne.
Fixes #27416.


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


git-svn-id: http://core.svn.wordpress.org/trunk@27387 1a063a9b-81f0-0310-95a4-ce76da25c4cd
TinyMCE: add internal command and shortcut (Alt+Shift+X) for toggling <code>. Define a button that can be added to any toolbar as `wp_code`.  See #6113
Built from https://develop.svn.wordpress.org/trunk@27545


git-svn-id: http://core.svn.wordpress.org/trunk@27388 1a063a9b-81f0-0310-95a4-ce76da25c4cd
WP_Filesystem: Update request_filesystem_credentials() to handle the correct ssh value of FS_METHOD. Props jnielsendotnet. Fixes #27265

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


git-svn-id: http://core.svn.wordpress.org/trunk@27389 1a063a9b-81f0-0310-95a4-ce76da25c4cd
All destructive row actions should be styled as such.

This fixes spam and trash links in the dashboard activity widget.

props avryl.
fixes #27370.

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


git-svn-id: http://core.svn.wordpress.org/trunk@27390 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Fix .comment-grey-bubble markup and remove a stray </h5> tag.

props avryl.
fixes #27408.
Built from https://develop.svn.wordpress.org/trunk@27548


git-svn-id: http://core.svn.wordpress.org/trunk@27391 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Permalink Settings: Don't show "update your .htaccess now" if nothing needs to change.

props ldebrouwer, MikeHansenMe.
fixes #19268.

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


git-svn-id: http://core.svn.wordpress.org/trunk@27392 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Pass feed_type arg in wp_list_authors() to get_author_feed_link().

Adds a slate of tests for wp_list_authors().

props MikeHansenMe.
fixes #26538.

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


git-svn-id: http://core.svn.wordpress.org/trunk@27393 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Avoid saving slashed data in XML-RPC's wp.setOptions.

props danielbachhuber.
fixes #22936.

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


git-svn-id: http://core.svn.wordpress.org/trunk@27394 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Allow query strings for servers in IXR_Client and WP_HTTP_IXR_Client.

props cfinke.
fixes #26947.

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


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