* 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.
git-svn-id: https://develop.svn.wordpress.org/trunk@27909 602fd350-edb4-49c9-b593-d223f7449a82
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.
git-svn-id: https://develop.svn.wordpress.org/trunk@27907 602fd350-edb4-49c9-b593-d223f7449a82
* 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.
git-svn-id: https://develop.svn.wordpress.org/trunk@27798 602fd350-edb4-49c9-b593-d223f7449a82
* Move `WidgetCustomizerPreview` to `wp.customize.WidgetCustomizerPreview`
* Move `WidgetCustomizerPreview_exports` to export_preview_data()
* Use `_wpWidgetCustomizerPreviewSettings` to transfer settings to `wp.customize.WidgetCustomizerPreview`
see #27485.
git-svn-id: https://develop.svn.wordpress.org/trunk@27653 602fd350-edb4-49c9-b593-d223f7449a82
* 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.
git-svn-id: https://develop.svn.wordpress.org/trunk@27652 602fd350-edb4-49c9-b593-d223f7449a82
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.
git-svn-id: https://develop.svn.wordpress.org/trunk@27540 602fd350-edb4-49c9-b593-d223f7449a82
Let _wp_customize_include() handle customizer initialisation.
Sets also the priority for the Add Widget and Reorder buttons and removes debug cruft.
props westonruter.
fixes#27291.
git-svn-id: https://develop.svn.wordpress.org/trunk@27524 602fd350-edb4-49c9-b593-d223f7449a82