* Re-work how and when widget forms get updated.
* Replace ad hoc hooks system with jQuery events,
* Add `widget-updated`/`widget-synced` events for widget soft/hard updates.
* Enter into a non-live form update mode, where the Apply button is restored when a sanitized form does not have the same fields as currently in the form, and so the fields cannot be easily updated to their sanitized values without doing a complete form replacement. Also restores live update mode if sanitized fields are aligned with the existing fields again.
Note: jQuery events are *not* final yet, see #19675.
props westonruter.
see #27491.
Built from https://develop.svn.wordpress.org/trunk@27909
git-svn-id: http://core.svn.wordpress.org/trunk@27740 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Some plugins are using custom scripts and styles for there widgets. These are available on the Widgets screens, but not in the Customizer yet.
Scripts and styles can be enqueued via:
* `admin_enqueue_scripts`
* `admin_print_scripts` and `admin_print_scripts-widgets.php`
* `admin_print_styles` and `admin_print_styles-widgets.php`
* `admin_print_footer_scripts` and `admin_footer-widgets.php`
All this hooks are now called in the Customizer too.
Previously we have add the `#widgets-right` ID to a container div via jQuery. Remember: `#widgets-right` exists on the Widgets screen and is used by many plugins to do event delegation from that element.
But since our script files are loaded in the footer, the JavaScript way is a bit late for some plugins.
We have decided to add a `div#widgets-right` container element to customizer. "Less hacky hack."
props westonruter, ocean90. Thanks dpe415 for testing.
fixes#27619.
Built from https://develop.svn.wordpress.org/trunk@27907
git-svn-id: http://core.svn.wordpress.org/trunk@27738 1a063a9b-81f0-0310-95a4-ce76da25c4cd
* Support widgets which are higher than browsers viewport.
* Use widgets width as max-width.
* Don't animate the width of wide widgets to make them visible, instead fade them in/out.
* Fix Chrome flickerings while updating wide widgets.
props adamsilverstein, westonruter, ocean90.
see #27348.
Built from https://develop.svn.wordpress.org/trunk@27798
git-svn-id: http://core.svn.wordpress.org/trunk@27633 1a063a9b-81f0-0310-95a4-ce76da25c4cd
* Move `WidgetCustomizerPreview` to `wp.customize.WidgetCustomizerPreview`
* Move `WidgetCustomizerPreview_exports` to export_preview_data()
* Use `_wpWidgetCustomizerPreviewSettings` to transfer settings to `wp.customize.WidgetCustomizerPreview`
see #27485.
Built from https://develop.svn.wordpress.org/trunk@27653
git-svn-id: http://core.svn.wordpress.org/trunk@27496 1a063a9b-81f0-0310-95a4-ce76da25c4cd
* Replace Widget_Customizer_Exception with WP_Error
* Call Previewer.cheatin() to show the cheating message if a user can't change widgets
* Call Previewer.login() to show the login form if a user is logged out
* Show a generic error message on failures
see #27419.
Built from https://develop.svn.wordpress.org/trunk@27652
git-svn-id: http://core.svn.wordpress.org/trunk@27495 1a063a9b-81f0-0310-95a4-ce76da25c4cd