WP_Widget: Introduce `is_preview()` method.

With the Widget Customizer it's possible that previewed widgets can leak data outside of Customizer, when the widget uses the cache API.
The Customizer calls the regular update callback which should already refresh the cache. Since cache additions aren't blocked yet the cache can be filled with preview data.
To prevent this issue `WP_Widget::is_preview()` will return true, when `$wp_customize->is_preview()` returns true. If `is_preview()` is true, cache additions are suspended via `wp_suspend_cache_addition()`. Make sure your object cache drop-in has implemented `wp_suspend_cache_addition()`.

`is_preview()` can/should also be used inside `WP_Widget::widget()`, see WP_Widget_Recent_Posts or WP_Widget_Recent_Comments for examples.

For more info see IRC logs: http://irclogs.wordpress.org/chanlog.php?channel=wordpress-dev&day=2014-04-02&sort=asc#m824279

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


git-svn-id: http://core.svn.wordpress.org/trunk@27796 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Fix whitespace around `$GLOBALS['_wp_deprecated_widgets_callbacks'] `.
Built from https://develop.svn.wordpress.org/trunk@27967


git-svn-id: http://core.svn.wordpress.org/trunk@27797 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Widget Customizer: Minor code cleanup.

* Remove type hinting from `WP_Customize_Widgets`
* Rename `inject_preview_css` to `print_preview_css`
* Remove stray `@todo`

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


git-svn-id: http://core.svn.wordpress.org/trunk@27798 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Widgets: Trigger jQuery events for widget updates.
* `widget-added` when a widget is added to a sidebar
* `widget-updated` when a widget is updated
A jQuery object of the widget is passed along to the event handler. Same events are used in the Widget Customizer, see [27909].

fixes #19675.
Built from https://develop.svn.wordpress.org/trunk@27969


git-svn-id: http://core.svn.wordpress.org/trunk@27799 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Header images: Improve accessibility of Randomize buttons.

props ehg.
see #27598, #21785.
Built from https://develop.svn.wordpress.org/trunk@27970


git-svn-id: http://core.svn.wordpress.org/trunk@27800 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Header images: Revert unnecessary `tabindex="0"` from [27947].

see #21785.
Built from https://develop.svn.wordpress.org/trunk@27971


git-svn-id: http://core.svn.wordpress.org/trunk@27801 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Update TinyMCE help for pasting content.

props chiragswadia.
see #27100.
Built from https://develop.svn.wordpress.org/trunk@27972


git-svn-id: http://core.svn.wordpress.org/trunk@27802 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Widget Customizer: Remove leading/trailing whitespace to prevent jQuery migrate warning.

props gcorne.
fixes #27689.
Built from https://develop.svn.wordpress.org/trunk@27973


git-svn-id: http://core.svn.wordpress.org/trunk@27803 1a063a9b-81f0-0310-95a4-ce76da25c4cd
When dynamically instantiating `MediaElementPlayer` instances in JS, `preload="metadata"` is extremely wonky. `preload="none"` lets the file play right away. 

This has already been addressed for audio|video shortcodes, but also needs to be the case for playlists. When loading a playlist from a DOM cache or via AJAX, and when the sources match those already pre-loaded, the browser will sometimes donkey-punch the HTTP request for the first cached track selected.

Set `preload="none"` for the empty `<audio|video>` tag for playlists.

See commits related to #26779.


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


git-svn-id: http://core.svn.wordpress.org/trunk@27804 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Apply checks in [27964] to wp_write_post(), which is unused and due for dismantling and deprecation.

see #27452.

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


git-svn-id: http://core.svn.wordpress.org/trunk@27805 1a063a9b-81f0-0310-95a4-ce76da25c4cd
TinyMCE:
- Tighten up button styles, add :hover for .mce-active buttons.
- Pad only the first toolbar row and remove the padding in both toolbars if the editor doesn't have a DFW mode.
Part props avryl, see #27279
Built from https://develop.svn.wordpress.org/trunk@27978


git-svn-id: http://core.svn.wordpress.org/trunk@27808 1a063a9b-81f0-0310-95a4-ce76da25c4cd
[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
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
Heartbeat: no longer "experimental", see #25272
Built from https://develop.svn.wordpress.org/trunk@27981


git-svn-id: http://core.svn.wordpress.org/trunk@27811 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Add a note that wpView is "experimental", see #26959
Built from https://develop.svn.wordpress.org/trunk@27982


git-svn-id: http://core.svn.wordpress.org/trunk@27812 1a063a9b-81f0-0310-95a4-ce76da25c4cd
TinyMCE: couple more small css tweaks for the menubar and tabs in native modals, see #27279
Built from https://develop.svn.wordpress.org/trunk@27983


git-svn-id: http://core.svn.wordpress.org/trunk@27813 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Remove trailing whitespace from [27982].
Built from https://develop.svn.wordpress.org/trunk@27984


git-svn-id: http://core.svn.wordpress.org/trunk@27814 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Widget Customizer: Move `WidgetCustomizer` to `wp.customize.Widgets`. First pass.

see #27690.
Built from https://develop.svn.wordpress.org/trunk@27985


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