* `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.
git-svn-id: https://develop.svn.wordpress.org/trunk@27969 602fd350-edb4-49c9-b593-d223f7449a82
* 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
* Better more filters section. props sonjanyc for some mockups.
* Better handling of no results.
* Use # for hrefs.
props matveb.
see #27055.
git-svn-id: https://develop.svn.wordpress.org/trunk@27896 602fd350-edb4-49c9-b593-d223f7449a82
- Use standard button styles for the Quicktags buttons.
- Better style for the TinyMCE buttons (hover/focus/active/disabled).
- Move the fullscreen (DFW) button to the right.
- Better style for the Visual/Text buttons in DFW.
Props avryl, see #27279
git-svn-id: https://develop.svn.wordpress.org/trunk@27857 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
Prevent the form only from saving when enter is pressed on a select element or an input, which hasn't the button type.
props westonruter, ocean90.
fixes#26633.
git-svn-id: https://develop.svn.wordpress.org/trunk@27757 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 replacement of spaces is now done globally.
* The search term is now escaped for RegExp meta characters.
props westonruter for the hint.
fixes#27479.
git-svn-id: https://develop.svn.wordpress.org/trunk@27649 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