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